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

使用sqlite默认设置,在cta回测界面下载数据时报错,已有rqdata权限。vnpy2.5.0版本应该用哪个版本的rqdata啊?
Traceback (most recent call last):
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 2949, 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 "/home/cheng/anaconda3/lib/python3.7/site-packages/vnpy_datamanager/ui/widget.py", line 600, in download
count = self.engine.download_bar_data(symbol, exchange, interval, start)
File "/home/cheng/anaconda3/lib/python3.7/site-packages/vnpy_datamanager/engine.py", line 211, in download_bar_data
database_manager.save_bar_data(data)
File "/home/cheng/anaconda3/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 "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 1785, in inner
return method(self, database, args, **kwargs)
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 1856, in execute
return self._execute(database)
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 2572, in _execute
return super(Insert, self)._execute(database)
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 2320, in _execute
cursor = database.execute(self)
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 2962, in execute
return self.execute_sql(sql, params, commit=commit)
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 2956, in execute_sql
self.commit()
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 2732, in exit
reraise(new_type, new_type(
exc_args), traceback)
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 183, in reraise
raise value.with_traceback(tb)
File "/home/cheng/anaconda3/lib/python3.7/site-packages/peewee.py", line 2949, in execute_sql
cursor.execute(sql, params or ())
peewee.OperationalError: table dbbardata has no column named turnover

Member
avatar
加入于:
帖子: 43
声望: 5

2.5版本对数据库的字段进行了更新。把原来的数据库删除再下载就行。

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

郭易燔 wrote:

2.5版本对数据库的字段进行了更新。把原来的数据库删除再下载就行。
非常感谢,按你说的可以下载了

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

沪公网安备 31011502017034号