You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CTA策略初始化,载入历史数据触发异常 File "C:\veighna_studio\lib\site-packages\vnpy_okx\okx_gateway.py", line 432, in query_history ts, o, h, l, c, vol, _ = bar_list ValueError: too many values to unpack (expected 7)
#38
Open
linhertz opened this issue
Aug 31, 2024
· 3 comments
[TEST] 触发异常已停止
Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 615, in call_strategy_func
func()
File "C:\Develop\strategies\BTC_240831_tick_OC.py", line 227, in on_init
self.load_bar(10)
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\template.py", line 306, in load_bar
bars: List[BarData] = self.cta_engine.load_bar(
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 568, in load_bar
bars: List[BarData] = self.main_engine.query_history(req, contract.gateway_name)
File "C:\veighna_studio\lib\site-packages\vnpy\trader\engine.py", line 225, in query_history
return gateway.query_history(req)
File "C:\veighna_studio\lib\site-packages\vnpy_okx\okx_gateway.py", line 202, in query_history
return self.rest_api.query_history(req)
File "C:\veighna_studio\lib\site-packages\vnpy_okx\okx_gateway.py", line 432, in query_history
ts, o, h, l, c, vol, _ = bar_list
ValueError: too many values to unpack (expected 7)
The text was updated successfully, but these errors were encountered:
[TEST] 触发异常已停止
Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 615, in call_strategy_func
func()
File "C:\Develop\strategies\BTC_240831_tick_OC.py", line 227, in on_init
self.load_bar(10)
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\template.py", line 306, in load_bar
bars: List[BarData] = self.cta_engine.load_bar(
File "C:\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 568, in load_bar
bars: List[BarData] = self.main_engine.query_history(req, contract.gateway_name)
File "C:\veighna_studio\lib\site-packages\vnpy\trader\engine.py", line 225, in query_history
return gateway.query_history(req)
File "C:\veighna_studio\lib\site-packages\vnpy_okx\okx_gateway.py", line 202, in query_history
return self.rest_api.query_history(req)
File "C:\veighna_studio\lib\site-packages\vnpy_okx\okx_gateway.py", line 432, in query_history
ts, o, h, l, c, vol, _ = bar_list
ValueError: too many values to unpack (expected 7)
The text was updated successfully, but these errors were encountered: