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

有大佬在ubuntu20.04 用jupyter notebook 使用多线程并行优化cta回测,报错Uncaught exception in zmqstream callback, ValueError: Duplicate Signature: b'*',windows没有这个问题,研究了一下,应该是jupyter 使用multiprocessing 导致的问题。暂时没找到解决办法。
具体报错:
[E 21:25:39.983 NotebookApp] Exception in callback functools.partial(<function ZMQStream._update_handler.<locals>.<lambda> at 0x7f90d499a5e0>)
Traceback (most recent call last):
File "/home/ubuntu/programs/anaconda3/lib/python3.8/site-packages/tornado/ioloop.py", line 741, in _run_callback
ret = callback()
File "/home/ubuntu/programs/anaconda3/lib/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 548, in <lambda>
self.io_loop.add_callback(lambda : self._handle_events(self.socket, 0))
File "/home/ubuntu/programs/anaconda3/lib/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 462, in _handle_events
self._handle_recv()
File "/home/ubuntu/programs/anaconda3/lib/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 492, in _handle_recv
self._run_callback(callback, msg)
File "/home/ubuntu/programs/anaconda3/lib/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 444, in _run_callback
callback(
args,
kwargs)
File "/home/ubuntu/programs/anaconda3/lib/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 203, in <lambda>
self.on_recv(lambda msg: callback(self, msg), copy=copy)
File "/home/ubuntu/programs/anaconda3/lib/python3.8/site-packages/notebook/services/kernels/handlers.py", line 442, in _on_zmq_reply
msg = self.session.deserialize(fed_msg_list)
File "/home/ubuntu/programs/anaconda3/lib/python3.8/site-packages/jupyter_client/session.py", line 923, in deserialize
raise ValueError("Duplicate Signature: %r" % signature)
ValueError: Duplicate Signature: b'b495da5b0364e1cbe145a514d1b547029e141e5e9ad9054944de573b5239434e'

Administrator
avatar
加入于:
帖子: 4497
声望: 309

一般不推荐用jupyter跑多进程模式的代码,会导致各种奇怪问题

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

沪公网安备 31011502017034号

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