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

Traceback (most recent call last):
File "D:\conda\vnpy\app\data_manager\ui\widget.py", line 381, in update_data
overview.end
File "D:\conda\vnpy\app\data_manager\engine.py", line 208, in download_bar_data
data = rqdata_client.query_history(req)
File "D:\conda\vnpy\trader\rqdata.py", line 182, in query_history
dt = row.name.to_pydatetime() - adjustment
AttributeError: 'tuple' object has no attribute 'to_pydatetime'

Member
avatar
加入于:
帖子: 5078
声望: 306

请升级至最新版本再试试看

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

mxw wrote:

Traceback (most recent call last):
File "D:\conda\vnpy\app\data_manager\ui\widget.py", line 381, in update_data
overview.end
File "D:\conda\vnpy\app\data_manager\engine.py", line 208, in download_bar_data
data = rqdata_client.query_history(req)
File "D:\conda\vnpy\trader\rqdata.py", line 182, in query_history
dt = row.name.to_pydatetime() - adjustment
AttributeError: 'tuple' object has no attribute 'to_pydatetime'

这个问题解决了嘛,我这边也出现了这个问题

Member
avatar
加入于:
帖子: 5078
声望: 306

请升级至最新版本再试试看

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

xiaohe wrote:

请升级至最新版本再试试看
前几次别的问题,你也是这么回复的,但好像不是版本的问题,我另一台电脑一样的版本没有这个问题

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

石天boss wrote:

mxw wrote:

Traceback (most recent call last):
File "D:\conda\vnpy\app\data_manager\ui\widget.py", line 381, in update_data
overview.end
File "D:\conda\vnpy\app\data_manager\engine.py", line 208, in download_bar_data
data = rqdata_client.query_history(req)
File "D:\conda\vnpy\trader\rqdata.py", line 182, in query_history
dt = row.name.to_pydatetime() - adjustment
AttributeError: 'tuple' object has no attribute 'to_pydatetime'

这个问题解决了嘛,我这边也出现了这个问题
目前查出问题所在,应该由于米筐数据接口打开导致load_bar的数据下载方式又本地数据库转到了rqdata.py文件里的query_history函数,这里如果接口没开,self.symbol会为none,从而返回空值,然后bar会在engine里通过database_manager.load_bar_data()下载,所以目前最简单的方法应该是对query_history函数直接return空值,不触发下载机制。如果有朋友想要用米筐接口下载的话要另行研究了,我目前还没弄出来,只知道在df.iterrows的row中因为是元组如('AG2206', Timestamp('2021-12-06 10:51:00'))还包括了合约信息才导致的无法to_pydatetime。

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

xiaohe wrote:

请升级至最新版本再试试看
准备更新的包:
vnstation : 2.5.7 -> 2.7.1

点击下方按钮开始更新

开始更新:vnstation
更新失败:vnstation
b"Could not install packages due to an EnvironmentError: [WinError 5] \xbe\xdc\xbe\xf8\xb7\xc3\xce\xca\xa1\xa3: 'd:\\softword\\vnstudio\\scripts\\vnstation.exe'\r\nConsider using the --user option or check the permissions.\r\n\r\nYou are using pip version 19.0.3, however version 21.3.1 is available.\r\nYou should consider upgrading via the 'python -m pip install --upgrade pip' command.\r\n"

部分包更新失败!
不太确定更新能不能解决问题,但是好像更新都没法更新

Member
avatar
加入于:
帖子: 5078
声望: 306

可以再试几次,记得不要开360

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

沪公网安备 31011502017034号

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