execve error with the subprocess module

Y

yogamatt1970

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.

Any help is appreciated.
 
G

Gabriel Genellina

En Tue, 21 Oct 2008 13:45:10 -0200, (e-mail address removed)
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)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top