Traceback (most recent call last):
File "C:\Softwares\veighna_studio\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Softwares\veighna_studio\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy\event\engine.py", line 60, in _run
self._process(event)
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy\event\engine.py", line 73, in _process
[handler(event) for handler in self._handlers[event.type]]
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy\event\engine.py", line 73, in
[handler(event) for handler in self._handlers[event.type]]
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 211, in process_trade_event
self.sync_strategy_data(strategy)
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 842, in sync_strategy_data
save_json(self.data_filename, self.strategy_data)
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy\trader\utility.py", line 119, in save_json
json.dump(
File "C:\Softwares\veighna_studio\lib\json__init__.py", line 179, in dump
for chunk in iterable:
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 438, in _iterencode
o = _default(o)
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type int32 is not JSON serializable
错误信息如下。委托成交后同步数据时json保存出错。
Traceback (most recent call last): File "C:\Softwares\veighna_studio\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Softwares\veighna_studio\lib\threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "C:\Softwares\veighna_studio\lib\site-packages\vnpy\event\engine.py", line 60, in _run self._process(event) File "C:\Softwares\veighna_studio\lib\site-packages\vnpy\event\engine.py", line 73, in _process [handler(event) for handler in self._handlers[event.type]] File "C:\Softwares\veighna_studio\lib\site-packages\vnpy\event\engine.py", line 73, in
[handler(event) for handler in self._handlers[event.type]]
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 211, in process_trade_event
self.sync_strategy_data(strategy)
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 842, in sync_strategy_data
save_json(self.data_filename, self.strategy_data)
File "C:\Softwares\veighna_studio\lib\site-packages\vnpy\trader\utility.py", line 119, in save_json
json.dump(
File "C:\Softwares\veighna_studio\lib\json__init__.py", line 179, in dump
for chunk in iterable:
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 405, in _iterencode_dict
yield from chunks
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 438, in _iterencode
o = _default(o)
File "C:\Softwares\veighna_studio\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type int32 is not JSON serializable