[issue29517] "Can't pickle local object" when uses functools.partial with method and args...
DAVID ALEJANDRO Pineda
report at bugs.python.org
Thu Feb 9 16:41:25 EST 2017
New submission from DAVID ALEJANDRO Pineda:
Hello.
I'm working in a real time data collector project. I'm using asyncio and multiprocessing (run_in_executor).
In python 3.5 worked fine but in python 3.6 not, gave to me this error:
"Traceback (most recent call last):
File "/usr/local/lib/python3.6/multiprocessing/queues.py", line 241, in _feed
obj = _ForkingPickler.dumps(obj)
File "/usr/local/lib/python3.6/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
AttributeError: Can't pickle local object 'WeakSet.__init__.<locals>._remove'
"
I tracked and the problem is when i run some method in run_in_executor with the functools.partial.
Before this version the system works fine.
The main file is local.py (to run with local administration using a socket)
And the engine is in engine.py
The project (in development):
https://gitlab.com/pineiden/collector
----------
components: asyncio
files: code_with_bug.png
messages: 287459
nosy: DAVID ALEJANDRO Pineda, gvanrossum, yselivanov
priority: normal
severity: normal
status: open
title: "Can't pickle local object" when uses functools.partial with method and args...
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file46614/code_with_bug.png
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29517>
_______________________________________
More information about the Python-bugs-list
mailing list