Message261262
Python 3.5.1 x64 @ Windows 10 x64
The error message in the traceback for OSError/WinError 193 has bad formatting and the offending file name is not printed.
For example, this code:
----
import subprocess
testfile = open('testfile.notexecutable', 'wb')
testfile.close()
subprocess.check_call(['testfile.notexecutable'])
----
produces this output:
----
Traceback (most recent call last):
File "test.py", line 6, in <module>
subprocess.check_call(['testfile.notexecutable'])
File "C:\Program Files\Python35\lib\subprocess.py", line 579, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Program Files\Python35\lib\subprocess.py", line 560, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Program Files\Python35\lib\subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "C:\Program Files\Python35\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
----
Please note the "%1 is not a valid..." on the last line. Instead of the "%1" placeholder, the filename ("testfile.notexecutable") should appear instead.
Thanks :) |
|
Date |
User |
Action |
Args |
2016-03-06 16:56:29 | Raúl Núñez de Arenas | set | recipients:
+ Raúl Núñez de Arenas |
2016-03-06 16:56:29 | Raúl Núñez de Arenas | set | messageid: <1457283389.71.0.286389844503.issue26493@psf.upfronthosting.co.za> |
2016-03-06 16:56:29 | Raúl Núñez de Arenas | link | issue26493 messages |
2016-03-06 16:56:29 | Raúl Núñez de Arenas | create | |
|