Skip to content

fMRIPrep failed on ME Data (at sbref discovery?) #3646

Description

@jw-research

What happened?

After using fMRIprep on a variety of our own datasets (all single-echo) successfully, I tried it on an open-source multi-echo dataset downloaded from OpenNeuro (https://openneuro.org/datasets/ds005118/versions/1.0.0), which contains 10 rsfMRI sessions acquired with 5 echoes. sbref files were also acquired, although there is no *sbref.json file. fMRIPrep proceeded to fail quite early on, at (what it looks like to me) is the sbref discovery (get_sbrefs) - see error log below. I tried using –ignore sbref and adding sbref files to the .bidsignore, but neither solved the issue. Unsure if this is a problem on my/the data's side or in fmriprep.

What command did you use?

(part of a larger helper script, but this is the actual docker command)

docker run --rm \
    -e TEMPLATEFLOW_HOME="${TEMPLATEFLOW}" \
    "${IMG}" \
    "${BIDS}" "${OUT}" participant \
    --participant-label "${SUB}" \
    --work-dir "${WORK}" \
    --output-spaces MNI152NLin2009cAsym fsaverage5 T1w \
    --skull-strip-template MNI152NLin2009cAsym \
    --fs-license-file "${FS_LICENSE}" \
    --nthreads "${NTHREADS}" \
    --omp-nthreads "${OMP}" \
    --mem_mb "${MEM_MB}" \
    >> "${SUB_LOG}" 2>&1
  local EXIT_CODE=$?

What version of fMRIPrep are you running?

I tried both 25.1.1 and then updating to 25.2.5, both failed with the same error message.

How are you running fMRIPrep?

Docker

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

[2026-05-07 16:09:02] [sub-ME01] Starting fMRIPrep
[2026-05-07 16:09:02] [sub-ME01] Image: mirror:5000/tumnic/nipreps/fmriprep:25.1.1 | Threads: 16 | OMP: 8 | Mem: 96000 MB
.
.
.
This dataset appears to be BIDS compatible.
        Summary:                  Available Tasks:        Available Modalities: 
        490 Files, 103.5GB                                MRI                   
        1 - Subject                                                             
        16 - Sessions                                                           
.
.
.
260507-14:09:32,478 nipype.workflow IMPORTANT:
	 Building fMRIPrep's workflow:
           * BIDS dataset path: /data_tina/data_neuroimaging/WCM-ME/rawdata.
           * Participant list: ['ME01'].
           * Run identifier: 20260507-140906_deebebed-6e68-4913-86c3-4b9bc6407ea7.
           * Output spaces: MNI152NLin2009cAsym:res-native fsaverage:den-10k T1w.
           * Pre-run FreeSurfer's SUBJECTS_DIR: /data_tina/data_neuroimaging/WCM-ME/derivatives/fmriprep_25_1_1/sourcedata/freesurfer.
260507-14:09:35,356 nipype.workflow INFO:
	 ANAT Stage 1: Adding template workflow
260507-14:09:35,526 nipype.workflow INFO:
	 ANAT Stage 2: Preparing brain extraction workflow
260507-14:09:35,643 nipype.workflow INFO:
	 ANAT Stage 3: Preparing segmentation workflow
260507-14:09:35,645 nipype.workflow INFO:
	 ANAT Stage 4: Preparing normalization workflow for ['MNI152NLin2009cAsym']
260507-14:09:35,651 nipype.workflow INFO:
	 ANAT Stage 5: Preparing surface reconstruction workflow
260507-14:09:35,662 nipype.workflow INFO:
	 ANAT Stage 6: Preparing mask refinement workflow
260507-14:09:35,664 nipype.workflow INFO:
	 ANAT Stage 7: Creating T2w template
260507-14:09:35,668 nipype.workflow INFO:
	 ANAT Stage 8: Creating GIFTI surfaces for ['white', 'pial', 'midthickness', 'sphere_reg', 'sphere']
260507-14:09:35,677 nipype.workflow INFO:
	 ANAT Stage 8: Creating GIFTI metrics for ['thickness', 'sulc']
260507-14:09:35,681 nipype.workflow INFO:
	 ANAT Stage 8a: Creating cortical ribbon mask
260507-14:09:35,684 nipype.workflow INFO:
	 ANAT Stage 9: Creating fsLR registration sphere
260507-14:09:35,686 nipype.workflow INFO:
	 ANAT Stage 10: Creating MSM-Sulc registration sphere
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/envs/fmriprep/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/fmriprep/cli/workflow.py", line 126, in build_workflow
    retval['workflow'] = init_fmriprep_wf()
                         ^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/base.py", line 95, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/base.py", line 781, in init_single_subject_wf
    bold_wf = init_bold_wf(
              ^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/bold/base.py", line 253, in init_bold_wf
    bold_fit_wf = init_bold_fit_wf(
                  ^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/bold/fit.py", line 211, in init_bold_fit_wf
    sbref_files = get_sbrefs(
                  ^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/bold/fit.py", line 88, in get_sbrefs
    return sorted(
           ^^^^^^^
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'
[2026-05-07 16:09:53] [sub-ME01] WARNING: Docker exited 0 but HTML report not found — output may be incomplete
[2026-05-07 16:09:53] [sub-ME01] Expected report: /data_tina/data_neuroimaging/WCM-ME/derivatives/fmriprep_25_1_1/sub-ME01.html
[2026-05-07 16:09:53] [sub-ME01] Runtime: 51s (~0min)

Additional information / screenshots

sample files contained in one functional session’s func folder, only files for echo-01 are shown; exist up to echo-05,

sub-ME01_ses-func01_task-rest_run-01_echo-01_bold.json
sub-ME01_ses-func01_task-rest_run-03_echo-01_bold.json
sub-ME01_ses-func01_task-rest_run-01_echo-01_bold.nii.gz
sub-ME01_ses-func01_task-rest_run-03_echo-01_bold.nii.gz
sub-ME01_ses-func01_task-rest_run-01_echo-01_sbref.nii.gz
sub-ME01_ses-func01_task-rest_run-03_echo-01_sbref.nii.gz
sub-ME01_ses-func01_task-rest_run-02_echo-01_bold.json
sub-ME01_ses-func01_task-rest_run-04_echo-01_bold.json
sub-ME01_ses-func01_task-rest_run-02_echo-01_bold.nii.gz
sub-ME01_ses-func01_task-rest_run-04_echo-01_bold.nii.gz
sub-ME01_ses-func01_task-rest_run-02_echo-01_sbref.nii.gz
sub-ME01_ses-func01_task-rest_run-04_echo-01_sbref.nii.gz

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions