Skip to content

Conversation

hjmjohnson
Copy link
Contributor

  •    proc = subprocess.Popen(["qstat", '-j', taskid],
    
  •    #  subprocess.Popen requires taskid to be a string
    
  •    proc = subprocess.Popen(["qstat", '-j', str(taskid)],
                                                                         ^^^^^^^^^^
    

TypeError: execv() arg 2 must contain only strings

This was causing nodes to crash when using SGE.

Simply typecast the integer to a string and the nodes pass.

File "/nfsscratch/PREDICT/johnsonhj/src/BRAINSStandAlone-Linux64-gcc44/NIPYPE/nipype/pipeline/plugins/sge.py", line 42, in _is_pending stderr=subprocess.PIPE)
File "/nfsscratch/PREDICT/opt/epd-7.2-1-rh5-x86_64/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite)
File "/nfsscratch/PREDICT/opt/epd-7.2-1-rh5-x86_64/lib/python2.7/subprocess.py", line 1228, in _execute_child raise child_exception
TypeError: execv() arg 2 must contain only strings

This was causing nodes to crash when using SGE.

Simply typecast the integer to a string and the nodes pass.
satra added a commit that referenced this pull request Aug 22, 2012
BUG: subprocess.Popen requres list of arguments to be strings
@satra satra merged commit 5e03d93 into master Aug 22, 2012
@satra satra deleted the bug/FixPopenTypeBug branch December 25, 2013 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants