Skip to content

Commit c6381f0

Browse files
committed
FIX: Find traceback data if result missing
1 parent 0d64df6 commit c6381f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nipype/pipeline/plugins/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ def _clean_queue(self, jobid, graph, result=None):
224224
self._status_callback(self.procs[jobid], 'exception')
225225

226226
if str2bool(self._config['execution']['stop_on_first_crash']):
227-
raise RuntimeError("".join(result['traceback']))
227+
if result is None:
228+
tb = '\n'.join(format_exception(*sys.exc_info()))
229+
else:
230+
tb = result['traceback']
231+
raise RuntimeError("".join(tb))
228232
crashfile = self._report_crash(self.procs[jobid], result=result)
229233
if jobid in self.mapnodesubids:
230234
# remove current jobid

0 commit comments

Comments
 (0)