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

Traceback (most recent call last):
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 2714, in execute_sql
cursor.execute(sql, params or ())
sqlite3.IntegrityError: UNIQUE constraint failed: index 'dbbardata_vt_symbol_interval_datetime'

During handling of the above exception, another exception occurred:
导入模块又出现这样的问题

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

还有这个:
Traceback (most recent call last):
File "c:\Users\Think\Documents\GitHub\learning_for_stock_testing_and_trading_system\vnpy-2.0.9\vnpy\app\cta_strategy\strategies\Testing.py", line 1, in <module>
from vnpy.app.cta_strategy import (
File "C:\ProgramData\VNConda\lib\site-packages\vnpy\app\cta_strategy__init.py", line 9, in <module>
from .engine import CtaEngine
File "C:\ProgramData\VNConda\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 27, in <module>
from vnpy.trader.database import DbTickData, DbBarData
File "C:\ProgramData\VNConda\lib\site-packages\vnpy\trader\database.py", line 234, in <module>
DB.create_tables([DbBarData, DbTickData])
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 2871, in create_tables
model.create_table(options)
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 5846, in create_table
cls._schema.create_all(safe,
options)
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 5072, in create_all
self.create_indexes(safe=safe)
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 4986, in create_indexes
self.database.execute(query)
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 2727, in execute
return self.execute_sql(sql, params, commit=commit)
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 2721, in execute_sql
self.commit()
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 2512, in
exit__
reraise(new_type, new_type(*exc_args), traceback)
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 186, in reraise
raise value.with_traceback(tb)
File "C:\ProgramData\VNConda\lib\site-packages\peewee.py", line 2714, in execute_sql
cursor.execute(sql, params or ())
peewee.IntegrityError: UNIQUE constraint failed: index 'dbbardata_vt_symbol_interval_datetime'

Administrator
avatar
加入于:
帖子: 4545
声望: 324

版本太老了,请升级到VNStudio-2.0.9

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

老师您好,我这边已经是最新版本了,导入模块一直出现问题,但是用vnstation没问题

Administrator
avatar
加入于:
帖子: 4545
声望: 324

C:\ProgramData\VNConda\lib\site-packages\peewee.py

这个报错说明你机器上还有其他的python环境,全部卸载干净后,重装VNStudio-2.0.9

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

沪公网安备 31011502017034号

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