Skip to content

Commit 47b30bb

Browse files
committed
BF(workaround): if heuristic provided just a string and not list of types -- make it a tuple
Closes #786
1 parent 383525d commit 47b30bb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

heudiconv/convert.py

+9
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,15 @@ def convert(
562562

563563
for item in items:
564564
prefix, outtypes, item_dicoms = item
565+
if isinstance(outtypes, str): # type: ignore[unreachable]
566+
lgr.warning( # type: ignore[unreachable]
567+
"Provided output types %r of type 'str' instead "
568+
"of a tuple for prefix %r. Likely need to fix-up your heuristic. "
569+
"Meanwhile we are 'manually' converting to 'tuple'",
570+
outtypes,
571+
prefix,
572+
)
573+
outtypes = (outtypes,)
565574
prefix_dirname = op.dirname(prefix)
566575
outname_bids = prefix + ".json"
567576
bids_outfiles = []

0 commit comments

Comments
 (0)