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

Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\vnstudio\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\vnstudio\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Truego\trader_fixed\vnpy\event\engine.py", line 60, in _run
self._process(event)
File "C:\Users\Truego\trader_fixed\vnpy\event\engine.py", line 73, in _process
[handler(event) for handler in self._handlers[event.type]]
File "C:\Users\Truego\trader_fixed\vnpy\event\engine.py", line 73, in <listcomp>
[handler(event) for handler in self._handlers[event.type]]
File "C:\Users\Truego\trader_fixed\vnpy\app\cta_strategy\engine.py", line 221, in process_trade_event
self.sync_strategy_data(strategy)
File "C:\Users\Truego\trader_fixed\vnpy\app\cta_strategy\engine.py", line 861, in sync_strategy_data
save_json(self.data_filename, self.strategy_data)
File "C:\Users\Truego\trader_fixed\vnpy\trader\utility.py", line 115, in save_json
ensure_ascii=False
File "C:\vnstudio\lib\json__init.py", line 179, in dump
for chunk in iterable:
File "C:\vnstudio\lib\json\encoder.py", line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "C:\vnstudio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "C:\vnstudio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "C:\vnstudio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "C:\vnstudio\lib\json\encoder.py", line 438, in _iterencode
o = _default(o)
File "C:\vnstudio\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.
class.name__} '
TypeError: Object of type method is not JSON serializable

请问是什么问题?谢谢

Administrator
avatar
加入于:
帖子: 4122
声望: 229

运行的什么交易策略?你把策略的函数名,放到variables列表里了

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