This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Cal.Leeming
Recipients Cal.Leeming
Date 2011-06-01.15:26:35
SpamBayes Score 2.633756e-08
Marked as misclassified No
Message-id <1306941997.06.0.876478438314.issue12235@psf.upfronthosting.co.za>
In-reply-to
Content
If you attempt to call subprocess.check_output() on a file which is not executable, it gives a "file not found" exception, rather than "file not executable". Took me about 3 hours to figure out why it kept saying the file didn't exist, when it clearly did :|


 ***@***# ls -la ***/src/webapp/tools/grab.sh
-rwxr-xr-x 1 *** *** 4398 Apr 19 10:55 ***/src/webapp/tools/grab.sh

 ***@***# ***/src/webapp/tools/grab.sh
bash: ***/src/webapp/tools/grab.sh: /bin/sh^M: bad interpreter: No such file or directory


Traceback (most recent call last):

  File "***/src/webapp/../webapp/idx/fourchan/tasks.py", line 77, in run
    subprocess.check_output([ DOWNLOAD_BIN, ])

  File "/usr/local/lib/python2.7/subprocess.py", line 530, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)

  File "/usr/local/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)

  File "/usr/local/lib/python2.7/subprocess.py", line 1201, in _execute_child
    raise child_exception

OSError: [Errno 2] No such file or directory


Request:
None
History
Date User Action Args
2011-06-01 15:26:37Cal.Leemingsetrecipients: + Cal.Leeming
2011-06-01 15:26:37Cal.Leemingsetmessageid: <1306941997.06.0.876478438314.issue12235@psf.upfronthosting.co.za>
2011-06-01 15:26:36Cal.Leeminglinkissue12235 messages
2011-06-01 15:26:35Cal.Leemingcreate