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

Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\peewee.py", line 3251, in commit
return self._state.conn.commit()
sqlite3.OperationalError: database is locked

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnpy\app\data_recorder\ui\widget.py", line 147, in process_exception_event
raise exc_info[1].with_traceback(exc_info[2])
File "c:\vnstudio\lib\site-packages\vnpy\app\data_recorder\engine.py", line 75, in run
database_manager.save_bar_data([data])
File "c:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 387, in save_bar_data
self.class_bar.save_all(ds)
File "c:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py", line 156, in save_all
c).on_conflict_replace().execute()
File "c:\vnstudio\lib\site-packages\peewee.py", line 4126, in exit
return self._helper.exit(exc_type, exc_val, exc_tb)
File "c:\vnstudio\lib\site-packages\peewee.py", line 4160, in exit
self.commit(False)
File "c:\vnstudio\lib\site-packages\peewee.py", line 4139, in commit
self.db.commit()
File "c:\vnstudio\lib\site-packages\peewee.py", line 3251, in commit
return self._state.conn.commit()
File "c:\vnstudio\lib\site-packages\peewee.py", line 2873, in exit
reraise(new_type, new_type(exc_value, *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 3251, in commit
return self._state.conn.commit()
peewee.OperationalError: database is locked

description

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

sqlite只能支持单进程写入,所以不要同时开多个进程来录制或者导入数据

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

沪公网安备 31011502017034号