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

Traceback (most recent call last):
File "d:\vnstudio\lib\site-packages\vnpy\trader\ui\mainwindow.py", line 281, in open_widget
widget = widget_class(self.main_engine, self.event_engine)
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\ui\widget.py", line 37, in init
self.cta_engine.init_engine()
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 109, in init_engine
self.load_strategy_setting()
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 869, in load_strategy_setting
self.strategy_setting = load_json(self.setting_filename)
File "d:\vnstudio\lib\site-packages\vnpy\trader\utility.py", line 100, in load_json
data = json.load(f)
File "d:\vnstudio\lib\json__init.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "d:\vnstudio\lib\json\
init__.py", line 348, in loads
return _default_decoder.decode(s)
File "d:\vnstudio\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "d:\vnstudio\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Member
avatar
加入于:
帖子: 1661
声望: 112

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

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

谢谢,好了!

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

沪公网安备 31011502017034号