Skip to content

Commit 634afcf

Browse files
committed
FIX: Provide more runtime information when node execution fails
1 parent af3f8df commit 634afcf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

nipype/pipeline/engine/nodes.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,17 @@ def _run_command(self, execute, copyfiles=True):
750750
)
751751

752752
if exc_tb:
753+
runtime = result.runtime
754+
def _tab(field):
755+
from textwrap import indent
756+
return indent(field, '\t')
757+
753758
raise NodeExecutionError(
754-
f"Exception raised while executing Node {self.name}.\n\n{result.runtime.traceback}"
759+
f"Exception raised while executing Node {self.name}.\n\n"
760+
f"Cmdline:\n{_tab(runtime.cmdline)}\n"
761+
f"Stdout:\n{_tab(runtime.stdout)}\n"
762+
f"Stderr:\n{_tab(runtime.stderr)}\n"
763+
f"Traceback:\n{_tab(runtime.traceback)}"
755764
)
756765

757766
return result

0 commit comments

Comments
 (0)