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

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy\trader\ui\mainwindow.py", line 282, in open_widget
widget = widget_class(self.main_engine, self.event_engine)
File "C:\vnstudio\lib\site-packages\vnpy_ctastrategy\ui\widget.py", line 38, in init
self.cta_engine.init_engine()
File "C:\vnstudio\lib\site-packages\vnpy_ctastrategy\engine.py", line 114, in init_engine
self.load_strategy_setting()
File "C:\vnstudio\lib\site-packages\vnpy_ctastrategy\engine.py", line 901, in load_strategy_setting
strategy_config["setting"]
File "C:\vnstudio\lib\site-packages\vnpy_ctastrategy\engine.py", line 654, in add_strategy
strategy = strategy_class(self, strategy_name, vt_symbol, setting)
File "C:\Users\hang'hang\strategies\grid_strategy.py", line 63, in init
self.ping_list = json.load(self.Ping_Log)
File "C:\vnstudio\lib\json__init.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "C:\vnstudio\lib\json\
init__.py", line 348, in loads
return _default_decoder.decode(s)
File "C:\vnstudio\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\vnstudio\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 246001 (char 246000)
请问各位大佬是什么原因

Member
avatar
加入于:
帖子: 3140
声望: 216

请删除.vntrader文件夹下对应的json文件,再重启。你这个应该是删除cta_strategy_setting.json。如果删除重启还报同样的错,建议检查一下策略参数的类型。检查一下策略里是否有把str\bool\int\float以外的变量名,写到了parameters列表中,json文件保存不了这四种基础数据以外的类型,就会出错

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

沪公网安备 31011502017034号

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