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

Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 226, in import_data
start, end, count = self.engine.import_data_from_csv(
File "C:\veighna_studio\lib\site-packages\vnpy_datamanager\engine.py", line 48, in import_data_from_csv
buf: list = [line.replace("\0", "") for line in f]
File "C:\veighna_studio\lib\site-packages\vnpy_datamanager\engine.py", line 48, in <listcomp>
buf: list = [line.replace("\0", "") for line in f]
UnicodeDecodeError: 'gbk' codec can't decode byte 0xb7 in position 8: illegal multibyte sequence

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

Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 226, in import_data
start, end, count = self.engine.import_data_from_csv(
File "C:\veighna_studio\lib\site-packages\vnpy_datamanager\engine.py", line 59, in import_data_from_csv
dt: datetime = datetime.strptime(item[datetime_head], datetime_format)
KeyError: 'datetime'
现在是这样了,有没有大神指导一下?

Member
avatar
加入于:
帖子: 733
声望: 39

贴下你的CSV文件截图?包括表头部分的

Member
avatar
加入于:
帖子: 3698
声望: 238

查看一下你的csv时间那一列的名字是什么,默认是datetime,导入的时候把你csv时间那列的名字写在窗口的时间戳那一栏

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

沪公网安备 31011502017034号

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