Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions heudiconv/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,18 @@ def nipype_convert(
convertnode.terminal_output = "allatonce"
convertnode.inputs.bids_format = bids_options is not None
eg = convertnode.run()
if eg.runtime.returncode:
lgr.error(
f"Conversion has failed with exit code {eg.runtime.returncode}.\n"
f" Produced files: {eg.outputs.converted_files}\n"
f" stdout: {eg.runtime.stdout}\n"
f" stderr: {eg.runtime.stderr}"
)
import pdb

pdb.set_trace()
# TODO: make an option on behavior in such cases -- error or to continue
raise RuntimeError("Conversion has failed. Check the logs for more details")
# prov information
prov_file = prefix + "_prov.ttl" if with_prov else None
if prov_file:
Expand Down