Richard Oudkerk added the comment:
Attached is a patch for 3.4 which uses the __cause__ hack to embed the remote
traceback in the local traceback. It will not work for 2.x though.
>>> import multiprocessing, subprocess
>>> with multiprocessing.Pool() as p: p.apply(subprocess.Popen, (1,))
...
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/oudkerk/Repos/py-default/Lib/multiprocessing/pool.py", line 114,
in worker
result = (True, func(*args, **kwds))
File "/home/oudkerk/Repos/py-default/Lib/subprocess.py", line 838, in __init__
restore_signals, start_new_session)
File "/home/oudkerk/Repos/py-default/Lib/subprocess.py", line 1317, in
_execute_child
args = list(args)
TypeError: 'int' object is not iterable
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/oudkerk/Repos/py-default/Lib/multiprocessing/pool.py", line 245,
in apply
return self.apply_async(func, args, kwds).get()
File "/home/oudkerk/Repos/py-default/Lib/multiprocessing/pool.py", line 588,
in get
raise self._value
TypeError: 'int' object is not iterable
----------
keywords: +patch
Added file: http://bugs.python.org/file30109/pool-traceback.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13831>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com