Skip to content

Commit bd91552

Browse files
committed
fix: added check to trap exception when mapnode cannot retrieve inputs
1 parent 2c9c742 commit bd91552

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

nipype/pipeline/plugins/base.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,17 @@ def _send_procs_to_workers(self, updatehash=False, slots=None, graph=None):
319319
# send all available jobs
320320
logger.info('Submitting %d jobs' % len(jobids))
321321
for jobid in jobids[:slots]:
322-
if isinstance(self.procs[jobid], MapNode) and \
323-
self.procs[jobid].num_subnodes() > 1:
324-
submit = self._submit_mapnode(jobid)
325-
if not submit:
322+
if isinstance(self.procs[jobid], MapNode):
323+
try:
324+
num_subnodes = self.procs[jobid].num_subnodes()
325+
except Exception:
326+
self._clean_queue(jobid, graph)
327+
self.proc_pending[jobid] = False
326328
continue
329+
if num_subnodes > 1:
330+
submit = self._submit_mapnode(jobid)
331+
if not submit:
332+
continue
327333
# change job status in appropriate queues
328334
self.proc_done[jobid] = True
329335
self.proc_pending[jobid] = True

0 commit comments

Comments
 (0)