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

sqlite是vnstudio安装好后不需做任何配置就可以用了吗?

没有设置任何数据源,只需要用自己的行情数据,可是加入行情记录后好像也看不到啊?

description

description

实际上刚添加时有这样的错误
Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\peewee.py", line 3160, in execute_sql
cursor.execute(sql, params or ())
sqlite3.OperationalError: table dbtickdata 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_datarecorder\ui\widget.py", line 157, in process_exception_event
raise exc_info[1].with_traceback(exc_info[2])
File "c:\vnstudio\lib\site-packages\vnpy_datarecorder\engine.py", line 84, in run
self.database.save_tick_data(data)
File "c:\vnstudio\lib\site-packages\vnpy_sqlite\sqlite_database.py", line 208, in save_tick_data
DbTickData.insert_many(c).on_conflict_replace().execute()
File "c:\vnstudio\lib\site-packages\peewee.py", line 1911, in inner
return method(self, database, args, **kwargs)
File "c:\vnstudio\lib\site-packages\peewee.py", line 1982, in execute
return self._execute(database)
File "c:\vnstudio\lib\site-packages\peewee.py", line 2761, in _execute
return super(Insert, self)._execute(database)
File "c:\vnstudio\lib\site-packages\peewee.py", line 2479, in _execute
cursor = database.execute(self)
File "c:\vnstudio\lib\site-packages\peewee.py", line 3173, in execute
return self.execute_sql(sql, params, commit=commit)
File "c:\vnstudio\lib\site-packages\peewee.py", line 3167, in execute_sql
self.commit()
File "c:\vnstudio\lib\site-packages\peewee.py", line 2933, in exit
reraise(new_type, new_type(exc_value,
exc_args), traceback)
File "c:\vnstudio\lib\site-packages\peewee.py", line 191, in reraise
raise value.with_traceback(tb)
File "c:\vnstudio\lib\site-packages\peewee.py", line 3160, in execute_sql
cursor.execute(sql, params or ())
peewee.OperationalError: table dbtickdata has no column named turnover

当时点掉了,刚才又莫名点出来这个exception,幸好拷贝下来了,但是再去找却又找不到了

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

vnpy在2.5.0之后填在了turnover字段,旧版的数据库没有,所以冲突了,把用户名目录下.vntrader文件夹下的database.db删除重新运行vnstudio即可。

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

沪公网安备 31011502017034号

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