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

Exception in thread Thread-4:
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\peewee.py", line 2635, in _generate_insert
raise KeyError
KeyError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy\app\data_recorder\engine.py", line 107, in run
self.database_manager.save_tick_data(self.save_ticks_bfsql)
File "C:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 404, in save_tick_data
self.class_tick.save_all(ds)
File "C:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 345, in save_all
DbTickData.insert_many(c).on_conflict_replace().execute()
File "C:\vnstudio\lib\site-packages\peewee.py", line 1886, in inner
return method(self, database, *args, **kwargs)
File "C:\vnstudio\lib\site-packages\peewee.py", line 1957, in execute
return self._execute(database)
File "C:\vnstudio\lib\site-packages\peewee.py", line 2707, in _execute
return super(Insert, self)._execute(database)
File "C:\vnstudio\lib\site-packages\peewee.py", line 2442, in _execute
cursor = database.execute(self)
File "C:\vnstudio\lib\site-packages\peewee.py", line 3111, in execute
sql, params = ctx.sql(query).query()
File "C:\vnstudio\lib\site-packages\peewee.py", line 606, in sql
return obj.sql(self)
File "C:\vnstudio\lib\site-packages\peewee.py", line 2692, in sql
self._generate_insert(self._insert, ctx)
File "C:\vnstudio\lib\site-packages\peewee.py", line 2644, in _generate_insert
raise ValueError('Missing value for %s.' % column.name)
ValueError: Missing value for bid_price_2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\vnstudio\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\vnstudio\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\vnstudio\lib\site-packages\vnpy\app\data_recorder\engine.py", line 129, in run
print ('except Exception%s'%info)
TypeError: not all arguments converted during string formatting
光大期货就没问题,宏源就不行怎么办

Member
avatar
加入于:
帖子: 1987
声望: 131

应该是数据掉包了,报错里有说Missing value for bid_price_2.

Administrator
avatar
加入于:
帖子: 4592
声望: 262

这是自己改了接口吧,TICK对象少了 bid_price_2这个数据字段

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

沪公网安备 31011502017034号