vn.py官网
开源量化社区
Member
avatar
加入于:
帖子: 30
声望: 0

请教大家:用最新版的VN Trader 中数据管理,查看数据报错

Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnpy\app\data_manager\ui\widget.py", line 307, in show_data
end
File "c:\vnstudio\lib\site-packages\vnpy\app\data_manager\engine.py", line 164, in load_bar_data
end
File "c:\vnstudio\lib\site-packages\vnpy\trader\database\database_mongo.py", line 212, in load_bar_data
datetime__gte=convert_tz(start),
File "c:\vnstudio\lib\site-packages\vnpy\trader\database\database_mongo.py", line 355, in convert_tz
if not dt.tzinfo:
AttributeError: 'datetime.date' object has no attribute 'tzinfo'

Member
avatar
加入于:
帖子: 3118
声望: 181

这个问题在修复中,可以把vnpy.app.data_manager.ui.widget下的get_date_range函数的start和end改成

start = self.start_edit.dateTime().toPyDateTime()
end = self.end_edit.dateTime().toPyDateTime() + timedelta(days=1)
Member
avatar
加入于:
帖子: 30
声望: 0

改好了,谢谢!

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号