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

Traceback (most recent call last):
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 3144, 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 "/root/miniconda3/lib/python3.7/site-packages/vnpy/app/data_recorder/ui/widget.py", line 155, in process_exception_event
raise exc_info[1].with_traceback(exc_info[2])
File "/root/miniconda3/lib/python3.7/site-packages/vnpy/app/data_recorder/engine.py", line 82, in run
database_manager.save_bar_data(data)
File "/root/miniconda3/lib/python3.7/site-packages/vnpy/database/sqlite/sqlite_database.py", line 160, in save_bar_data
DbBarData.insert_many(c).on_conflict_replace().execute()
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 1907, in inner
return method(self, database, args, **kwargs)
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 1978, in execute
return self._execute(database)
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 2745, in _execute
return super(Insert, self)._execute(database)
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 2474, in _execute
cursor = database.execute(self)
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 3157, in execute
return self.execute_sql(sql, params, commit=commit)
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 3151, in execute_sql
self.commit()
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 2917, in exit
reraise(new_type, new_type(exc_value,
exc_args), traceback)
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 190, in reraise
raise value.with_traceback(tb)
File "/root/miniconda3/lib/python3.7/site-packages/peewee.py", line 3144, in execute_sql
cursor.execute(sql, params or ())
peewee.OperationalError: table dbbardata has no column named turnover

Administrator
avatar
加入于:
帖子: 4985
声望: 291

版本升级后数据库表新增字段导致的问题,请删除老的数据库后重启即可。

Member
avatar
加入于:
帖子: 84
声望: 1

我这个是ubuntu系统,数据库放在哪个位置了

Member
avatar
加入于:
帖子: 84
声望: 1

我装了几个版本,是用conda创建不同的虚拟的环境安装的,按理说不影响啊。是不是数据库是共同的,

Member
avatar
加入于:
帖子: 3027
声望: 174

.vntrader文件夹下的database.db

Member
avatar
加入于:
帖子: 84
声望: 1

可以了,看来是同时安装几个版本搞的。我是都安装在root下,conda几个环境,但是应该都装在.vntrader下冲突了。
如果创建几个不同的用户,再安装的话是不是可以避免这种情况?

Member
avatar
加入于:
帖子: 3027
声望: 174

在不同的文件夹下创建.vntrader文件夹维护即可

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

沪公网安备 31011502017034号