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

按着删除C:\user|adminstot.vntrader/cta-staratege.data.json和CTA_STRATEGY_SETTING.JSON两个文件,重置,还是出现这种情况。
description

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

raceback (most recent call last):
File "d:\vnstudio\lib\site-packages\vnpy\trader\ui\mainwindow.py", line 269, in closeEvent
self.main_engine.close()
File "d:\vnstudio\lib\site-packages\vnpy\trader\engine.py", line 229, in close
engine.close()
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 116, in close
self.stop_all_strategies()
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 855, in stop_all_strategies
self.stop_strategy(strategy_name)
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 716, in stop_strategy
self.sync_strategy_data(strategy)
File "d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\engine.py", line 812, in sync_strategy_data
save_json(self.data_filename, self.strategy_data)
File "d:\vnstudio\lib\site-packages\vnpy\trader\utility.py", line 116, in save_json
ensure_ascii=False
File "d:\vnstudio\lib\json__init.py", line 179, in dump
for chunk in iterable:
File "d:\vnstudio\lib\json\encoder.py", line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "d:\vnstudio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "d:\vnstudio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "d:\vnstudio\lib\json\encoder.py", line 438, in _iterencode
o = _default(o)
File "d:\vnstudio\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.
class.name_} '
TypeError: Object of type bool
is not JSON serializable

Member
avatar
加入于:
帖子: 5005
声望: 301

应该是save_json的时候报的错,可能是你的strategy_data(variables)里面有json无法解析的字符吧

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

沪公网安备 31011502017034号

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