Skip to content

Commit 61f6e92

Browse files
committed
BUG: subprocess.Popen requres list of arguments to be strings
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.
1 parent 2794721 commit 61f6e92

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nipype/pipeline/plugins/pbs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def __init__(self, **kwargs):
3636
super(PBSPlugin, self).__init__(template, **kwargs)
3737

3838
def _is_pending(self, taskid):
39-
proc = subprocess.Popen(["qstat", taskid],
39+
# subprocess.Popen requires taskid to be a string
40+
proc = subprocess.Popen(["qstat", str(taskid)],
4041
stdout=subprocess.PIPE,
4142
stderr=subprocess.PIPE)
4243
_, e = proc.communicate()

nipype/pipeline/plugins/sge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def __init__(self, **kwargs):
3737
super(SGEPlugin, self).__init__(template, **kwargs)
3838

3939
def _is_pending(self, taskid):
40-
proc = subprocess.Popen(["qstat", '-j', taskid],
40+
# subprocess.Popen requires taskid to be a string
41+
proc = subprocess.Popen(["qstat", '-j', str(taskid)],
4142
stdout=subprocess.PIPE,
4243
stderr=subprocess.PIPE)
4344
o, _ = proc.communicate()

0 commit comments

Comments
 (0)