We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eff1a6 commit 4a2af88Copy full SHA for 4a2af88
heudiconv/bids.py
@@ -326,6 +326,10 @@ def convert_sid_bids(subject_id):
326
"""
327
cleaner = lambda y: ''.join([x for x in y if x.isalnum()])
328
sid = cleaner(subject_id)
329
+ if not sid:
330
+ raise ValueError(
331
+ "Subject ID became empty after cleanup. Please provide manually "
332
+ "a suitable alphanumeric subject ID")
333
lgr.warning('{0} contained nonalphanumeric character(s), subject '
334
'ID was cleaned to be {1}'.format(subject_id, sid))
335
return sid, subject_id
0 commit comments