You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ./sample.py
new ProcessPool
Traceback (most recent call last):
File "/tmp/pe.py", line 20, in <module>
Tester().run()
File "/tmp/pe.py", line 18, in run
f.result()
File "/usr/lib64/python3.8/concurrent/futures/_base.py", line 439, in result
return self.__get_result()
File "/usr/lib64/python3.8/concurrent/futures/_base.py", line 388, in __get_result
raise self._exception
File "/usr/lib/python3.8/site-packages/pebble/pool/process.py", line 204, in schedule
self.worker_manager.dispatch(task)
File "/usr/lib/python3.8/site-packages/pebble/pool/process.py", line 335, in dispatch
raise error
File "/usr/lib/python3.8/site-packages/pebble/pool/process.py", line 333, in dispatch
self.pool_channel.send(WorkerTask(task.id, task.payload))
File "/usr/lib/python3.8/site-packages/pebble/pool/channel.py", line 66, in send
return self.writer.send(obj)
File "/usr/lib64/python3.8/multiprocessing/connection.py", line 206, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/usr/lib64/python3.8/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
TypeError: cannot pickle '_thread.RLock' object
The problem is that pickle is called for my Tester which contains a reference to pebble.ProcessFuture.
The text was updated successfully, but these errors were encountered:
It took me more than hour to realize what's wrong:
The problem is that pickle is called for my
Tester
which contains a reference topebble.ProcessFuture
.The text was updated successfully, but these errors were encountered: