[issue4925] Improve error message of subprocess

Martin Mokrejs report at bugs.python.org
Mon Jan 12 17:26:57 CET 2009


New submission from Martin Mokrejs <mmokrejs at users.sourceforge.net>:

I think the following error output unsatisfactory as it does not give me
any hint what file was not found:

$ fetch_quals.py blah.txt 
Traceback (most recent call last):
  File "/home/mmokrejs/bin/fetch_quals.py", line 15, in <module>
    _p1 = subprocess.Popen(['query_tracedb', 'retrieve', 'quality',
_id], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
    errread, errwrite)
  File "/usr/lib/python2.5/subprocess.py", line 1091, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
$

I know now that I had to specify full path tot he binary or include
shell=True argument but anyway, please improve the error message.

----------
components: Extension Modules
messages: 79684
nosy: mmokrejs
severity: normal
status: open
title: Improve error message of subprocess
type: behavior
versions: Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4925>
_______________________________________


More information about the Python-bugs-list mailing list