vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 2
声望: 0

用DataManager模块下载历史数据,参数:GC-20200827-USD-FUT,NYMEX,MINUTE,2020/1/1
跳出如下信息,怎么办?

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\vnpy\app\data_manager\ui\widget.py", line 586, in download
count = self.engine.download_bar_data(symbol, exchange, interval, start)
File "d:\vnstudio\lib\site-packages\vnpy\app\data_manager\engine.py", line 208, in download_bar_data
req, contract.gateway_name
File "d:\vnstudio\lib\site-packages\vnpy\trader\engine.py", line 216, in query_history
return gateway.query_history(req)
File "d:\vnstudio\lib\site-packages\vnpy\gateway\ib\ib_gateway.py", line 211, in query_history
return self.api.query_history(req)
File "d:\vnstudio\lib\site-packages\vnpy\gateway\ib\ib_gateway.py", line 741, in query_history
"""
TypeError: can't subtract offset-naive and offset-aware datetimes

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

已解决。
File "d:\vnstudio\lib\site-packages\vnpy\gateway\ib\ib_gateway.py", line 741,
修改为:delta = end - req.start.replace(tzinfo=None)

Administrator
avatar
加入于:
帖子: 4232
声望: 241

已在dev分支修复,非常感谢

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