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

C:\Anaconda3\python.exe E:/pythonNew/vnpy/examples/vn_trader/run.py
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\vnpy\trader\ui\mainwindow.py", line 265, in open_widget
widget = widget_class(self.main_engine, self.event_engine)
File "C:\Anaconda3\lib\site-packages\vnpy\app\cta_strategy\ui\widget.py", line 37, in init
self.cta_engine.init_engine()
File "C:\Anaconda3\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 111, in init_engine
self.load_strategy_data()
File "C:\Anaconda3\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 774, in load_strategy_data
self.strategy_data = load_json(self.data_filename)
File "C:\Anaconda3\lib\site-packages\vnpy\trader\utility.py", line 88, in load_json
data = json.load(f)
File "C:\Anaconda3\lib\json__init.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "C:\Anaconda3\lib\json\
init__.py", line 348, in loads
return _default_decoder.decode(s)
File "C:\Anaconda3\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Anaconda3\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 41 column 22 (char 786)

有朋友能否给个提示?

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

我也出现这个报错,不知道什么情况,求大神解答

Member
avatar
加入于:
帖子: 163
声望: 18

把.vntrader下的cta_strategy_data.json删了

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

谢谢,删了就好,我解决了。

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

还有一个地方,好像是,
就是策略布署的时候,名称好像不可能用中文,否则软件重启载入也会出错的,但是是cta_strategy_setting.json报错,不是cta_strategy_data.json

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