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

如题,出现以下错误提示:

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy\app\csv_loader\ui\widget.py", line 124, in load_data
datetime_format
File "C:\vnstudio\lib\site-packages\vnpy\app\csv_loader\engine.py", line 137, in load
datetime_format=datetime_format,
File "C:\vnstudio\lib\site-packages\vnpy\app\csv_loader\engine.py", line 105, in load_by_handle
database_manager.save_bar_data(bars)
File "C:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 368, in save_bar_data
self.class_bar.save_all(ds)
File "C:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 145, in save_all
c).on_conflict_replace().execute()
File "C:\vnstudio\lib\site-packages\peewee.py", line 1785, in inner
return method(self, database, args, **kwargs)
File "C:\vnstudio\lib\site-packages\peewee.py", line 1856, in execute
return self._execute(database)
File "C:\vnstudio\lib\site-packages\peewee.py", line 2571, in _execute
return super(Insert, self)._execute(database)
File "C:\vnstudio\lib\site-packages\peewee.py", line 2320, in _execute
cursor = database.execute(self)
File "C:\vnstudio\lib\site-packages\peewee.py", line 2953, in execute
return self.execute_sql(sql, params, commit=commit)
File "C:\vnstudio\lib\site-packages\peewee.py", line 2947, in execute_sql
self.commit()
File "C:\vnstudio\lib\site-packages\peewee.py", line 2729, in exit
reraise(new_type, new_type(
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 2940, in execute_sql
cursor.execute(sql, params or ())
peewee.IntegrityError: NOT NULL constraint failed: dbbardata.vt_symbol

Administrator
avatar
加入于:
帖子: 1908
声望: 85

数据库结构改变,请删除C:\users\administrator.vntrader\database.db后,重启即可

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

用Python的交易员 wrote:

数据库结构改变,请删除C:\users\administrator.vntrader\database.db后,重启即可
没有找到database.db或者 是databases.db;都没有找到诶

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

用Python的交易员 wrote:

数据库结构改变,请删除C:\users\administrator.vntrader\database.db后,重启即可
找到了,已解决,感谢vnpy主

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