Skip to content

Commit

Permalink
BF(workaround): if heuristic provided just a string and not list of t…
Browse files Browse the repository at this point in the history
…ypes -- make it a tuple

Closes nipy#786
  • Loading branch information
yarikoptic committed Sep 18, 2024
1 parent 383525d commit 47b30bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions heudiconv/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,15 @@ def convert(

for item in items:
prefix, outtypes, item_dicoms = item
if isinstance(outtypes, str): # type: ignore[unreachable]
lgr.warning( # type: ignore[unreachable]
"Provided output types %r of type 'str' instead "
"of a tuple for prefix %r. Likely need to fix-up your heuristic. "
"Meanwhile we are 'manually' converting to 'tuple'",
outtypes,
prefix,
)
outtypes = (outtypes,)
prefix_dirname = op.dirname(prefix)
outname_bids = prefix + ".json"
bids_outfiles = []
Expand Down

0 comments on commit 47b30bb

Please sign in to comment.