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

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\pandas\core\indexes\range.py", line 350, in get_loc
return self._range.index(new_key)
ValueError: 0 is not in range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\pandas\core\indexes\base.py", line 4387, in get_value
iloc = self.get_loc(key)
File "d:\vnstudio\lib\site-packages\pandas\core\indexes\range.py", line 352, in get_loc
raise KeyError(key)
KeyError: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 609, in download
count = self.engine.download_bar_data(symbol, exchange, interval, start)
File "d:\vnstudio\lib\site-packages\vnpy_datamanager\engine.py", line 215, in download_bar_data
self.database.save_bar_data(data)
File "d:\vnstudio\lib\site-packages\vnpy_dolphindb\dolphindb_database.py", line 116, in save_bar_data
start: datetime = df_start["datetime"][0]
File "d:\vnstudio\lib\site-packages\pandas\core\series.py", line 871, in getitem
result = self.index.get_value(self, key)
File "d:\vnstudio\lib\site-packages\pandas\core\indexes\base.py", line 4393, in get_value
return s[key]
File "d:\vnstudio\lib\site-packages\pandas\core\arrays\datetimelike.py", line 514, in getitem
val = getitem(key)
IndexError: index 0 is out of bounds for axis 0 with size 0

description

description

请问下这个是什么问题?

Super Moderator
avatar
加入于:
帖子: 529
声望: 43

是dolphindb对字符串和单个字符的处理不同导致的,可参考https://github.com/vnpy/vnpy_dolphindb/pull/14 进行修改

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

沪公网安备 31011502017034号

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