Python Bokeh DeprecationWarning:不建议解析时区的日期时间

问题描述 投票:1回答:1

我最近在Mac计算机上安装了Bokeh,并将其用于Python应用程序。每当我运行此应用程序时,它都会显示以下Deprecation Warning

.../anaconda/lib/python3.5/site-packages/bokeh/core/json_encoder.py:52: 
DeprecationWarning: parsing timezone aware datetimes is deprecated;    
this will raise an error in the future
NP_EPOCH = np.datetime64('1970-01-01T00:00:00Z')

很抱歉,我找不到与之相关的东西。而且,在警告的末尾说,此警告将来会引发错误。有人对这里发生的事情有想法吗?

我还尝试了以下语句来抑制它(如建议的here,但是它也没有解决:

import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning, module='.*/bokeh/*.')

我刚刚尝试过,但也没有解决:

warnings.filterwarnings("ignore", category=DeprecationWarning) 
python datetime warnings bokeh
1个回答
0
投票

您可以尝试

warnings.simplefilter(action='ignore', category=DeprecationWarning)
© www.soinside.com 2019 - 2024. All rights reserved.