execve error with the subprocess module

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Oct 22 00:26:55 EDT 2008


En Tue, 21 Oct 2008 13:45:10 -0200, yogamatt1970 at gmail.com  
<yogamatt1970 at gmail.com> escribió:

> I have some code which runs on a number of different machines, however
> I see problems on one particular Solaris box.  When I call
> Popen.wait(), the following exception is raised:
>
> . . .
> File "/basis/users/matt/Python-2.4.4/Lib/subprocess.py", line 558, in
> __init__
>     errread, errwrite)
>   File "/basis/users/matt/Python-2.4.4/Lib/subprocess.py", line 992,
> in _execute_child
>     raise child_exception
> TypeError: execve() arg 3 contains a non-string value
>
> I've been poking around a bit subprocess.py and I can't figure out why
> data is non-empty string in this line:
>  data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB)
>
>> From what I see, the command I'm running is perfectly valid and should
> be running without any problems.

The line numbers in your traceback don't match the 2.4.4 source - probably  
some debug statements you inserted, but make sure they don't interfere.

The TypeError is raised in the child process, before running your command,  
and basically means that you passed bogus data as the env parameter to  
subprocess.

-- 
Gabriel Genellina




More information about the Python-list mailing list