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

请问如下报错是什么原因:
`Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\peewee.py", line 3057, in execute_sql
cursor.execute(sql, params or ())
sqlite3.OperationalError: table dbbardata has no column named turnover

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 234, in import_data
datetime_format
File "c:\vnstudio\lib\site-packages\vnpy_datamanager\engine.py", line 87, in import_data_from_csv
database_manager.save_bar_data(bars)
File "c:\vnstudio\lib\site-packages\vnpy\database\sqlite\sqlite_database.py", line 160, in save_bar_data
DbBarData.insert_many(c).on_conflict_replace().execute()
File "c:\vnstudio\lib\site-packages\peewee.py", line 1845, in inner
return method(self, database, args, **kwargs)
File "c:\vnstudio\lib\site-packages\peewee.py", line 1916, in execute
return self._execute(database)
File "c:\vnstudio\lib\site-packages\peewee.py", line 2665, in _execute
return super(Insert, self)._execute(database)
File "c:\vnstudio\lib\site-packages\peewee.py", line 2400, in _execute
cursor = database.execute(self)
File "c:\vnstudio\lib\site-packages\peewee.py", line 3070, in execute
return self.execute_sql(sql, params, commit=commit)
File "c:\vnstudio\lib\site-packages\peewee.py", line 3064, in execute_sql
self.commit()
File "c:\vnstudio\lib\site-packages\peewee.py", line 2831, in exit
reraise(new_type, new_type(exc_value,
exc_args), traceback)
File "c:\vnstudio\lib\site-packages\peewee.py", line 183, in reraise
raise value.with_traceback(tb)
File "c:\vnstudio\lib\site-packages\peewee.py", line 3057, in execute_sql
cursor.execute(sql, params or ())
peewee.OperationalError: table dbbardata has no column named turnover
`

Member
avatar
加入于:
帖子: 78
声望: 9

新版本更新了数据库字段,添加了turnover,删除用户名目录下.vntrader下的database.db再使用就行,如果数据库中有需要保留的数据记得先取出来

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

沪公网安备 31011502017034号