[New-bugs-announce] [issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

Nikolaus Rath report at bugs.python.org
Wed Jul 28 18:03:47 CEST 2010

New submission from Nikolaus Rath <Nikolaus at rath.org>:

The attached test program calls apply_async with a function that will raise CalledProcessError. However, when result.get() is called, it raises a TypeError and the program hangs:

$ ./bug.py
Traceback (most recent call last):
  File "./bug.py", line 19, in run_with
    dW1 = run_dcon()
  File "./bug.py", line 26, in run_dcon
    subprocess.check_call(['dcon'], stdout=fh, stderr=fh)
  File "/usr/lib/python2.6/subprocess.py", line 498, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['dcon']' returned non-zero exit status 127
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.6/multiprocessing/pool.py", line 259, in _handle_results
    task = get()
TypeError: ('__init__() takes exactly 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())

components: Library (Lib)
files: bug.py
messages: 111827
nosy: Nikratio
priority: normal
severity: normal
status: open
title: multiprocessing.pool.AsyncResult.get() messes up exceptions
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file18233/bug.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list