Skip to content

Commit 0827c5a

Browse files
committed
enh: more description for assertion in #78
1 parent 8b63fef commit 0827c5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

heudiconv/dicoms.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ def group_dicoms_into_seqinfos(files, file_filter, dcmfilter, grouping):
8585
if studyUID is None:
8686
studyUID = file_studyUID
8787
elif not per_accession_number:
88-
assert studyUID == file_studyUID
88+
assert studyUID == file_studyUID, (
89+
"Conflicting study identifiers found [{}, {}].".format(
90+
studyUID, file_studyUID
91+
))
8992
except AttributeError as exc:
9093
lgr.warning('Ignoring %s since not quite a "normal" DICOM: %s',
9194
filename, exc)

0 commit comments

Comments
 (0)