BIDS Validator Illegal Filename?

Hi Experts,

I am trying to pass my dataset through online BIDS validator. Although I am following the BIDS naming criteria, the validator gives me this error:
“Sub label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec.”

Here is an example of the problematic file:

I am obviously missing something here, but could any one help me with fixing the issue?




Thank you Chris! The fix worked.

I am having a similar issue and I cannot find the problem.

I am using dcm2bids to convert DICOM to NII followed by fmriprep-docker

Attached is the folder structure and the output for the fmriprep-docker command.

Can someone help me figure this out? Thank you.

Hi @swatirane,

For functional images, the task key is mandatory.

If you change the filenames to
sub-001_task-rest_run-01_bold.nii.gz or whatever the task is, the validator should pass.

Hope this helps!

1 Like

Thanks @jdkent! That solved it.