VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 5
声望: 0

各位老师,新人求助,启动软件提示
Traceback (most recent call last):
File "C:/Users/Administrator/PycharmProjects/pythonProject/main.py", line 3, in <module>
from howtrader.trader.engine import MainEngine
File "C:\ProgramData\Anaconda3\envs\mytrader\lib\site-packages\howtrader\trader\engine.py", line 44, in <module>
from .setting import SETTINGS
File "C:\ProgramData\Anaconda3\envs\mytrader\lib\site-packages\howtrader\trader\setting.py", line 29, in <module>
"database.timezone": get_localzone().zone,
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'zone'

打不开软件了,之前还可以,重新换了个服务器就这样了

Member
avatar
加入于:
帖子: 14
声望: 0

同问

Member
avatar
加入于:
帖子: 4300
声望: 268

请问你的python版本是?

Member
avatar
加入于:
帖子: 4
声望: 0

Python 3.7.6 (default, Jan 8 2020, 19:59:22)

Member
avatar
加入于:
帖子: 4
声望: 0

(tutorial-env) (base) root@zhou6288:/home/vnpy-2.1.9/examples/no_ui# python run.py
Traceback (most recent call last):
File "run.py", line 8, in <module>
from vnpy.trader.setting import SETTINGS
File "/root/tutorial-env/lib/python3.7/site-packages/vnpy/trader/setting.py", line 30, in <module>
"database.timezone": get_localzone().zone,
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'zone'

Member
avatar
加入于:
帖子: 4
声望: 0

以上问题解决了,是没有启动数据库。但运行python run.py时,出现”启动CTA策略守护父进程“后一直没反应了

Member
avatar
加入于:
帖子: 4
声望: 0

原来运行的是no_ui文件夹下面的run.py不行,现在运行vntrader文件夹下面的run.py,介面可以了。

Member
avatar
加入于:
帖子: 16
声望: 2

zhouwencan wrote:

(tutorial-env) (base) root@zhou6288:/home/vnpy-2.1.9/examples/no_ui# python run.py
Traceback (most recent call last):
File "run.py", line 8, in <module>
from vnpy.trader.setting import SETTINGS
File "/root/tutorial-env/lib/python3.7/site-packages/vnpy/trader/setting.py", line 30, in <module>
"database.timezone": get_localzone().zone,
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'zone'

您好,请问下这个问题是怎么解决的,方便详细说下细节吗?谢谢!

Member
avatar
加入于:
帖子: 2
声望: 1

搞定了.pip install tzlocal==2.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

把tzlocal版本降级到2.1就解决了

Member
avatar
加入于:
帖子: 5
声望: 0

paul1579 wrote:

搞定了.pip install tzlocal==2.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

把tzlocal版本降级到2.1就解决了

感谢,用了这个办法,问题解决了

© 2015-2022 微信 18391752892
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】