nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
631 stars 292 forks source link

Failed fieldmap "no attribute error" in v 24.0.1 #3361

Closed zugmana closed 3 weeks ago

zugmana commented 3 weeks ago

What happened?

fMRIprep v24.0.1 is crashing when processing a dataset that was previously running ok on v23.1.4. I think this is because of unused fieldmaps in the fmap folders.

What command did you use?

singularity run fmriprep241.sif BIDS outfolder participant --participant_label 24626 -w ${TMPDIR}/24626.wrk --notrack --output-space MNI152NLin6Asym:res-2 T1w fsaverage fsLR fsnative --nthreads ${SLURM_CPUS_PER_TASK} --omp-nthreads ${SLURM_CPUS_PER_TASK} --me-output-echos --cifti-output 91k --mem 36 --skip_bids_validation --fs-license license.txt --project-goodvoxels

What version of fMRIPrep are you running?

24.0.1

How are you running fMRIPrep?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/envs/fmriprep/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/cli/workflow.py", line 126, in build_workflow
    retval['workflow'] = init_fmriprep_wf()
                         ^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/workflows/base.py", line 94, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/workflows/base.py", line 584, in init_single_subject_wf
    wf_inputs = getattr(fmap_wf.inputs, f'in_{estimator.bids_id}')
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TraitedSpec' object has no attribute 'in_Field-2-ses-4'

Additional information / screenshots

No response

effigies commented 3 weeks ago

The hyphens in your B0FieldIdentifiers are almost certainly the problem. Remove or replace with underscores, and that should resolve it.

zugmana commented 3 weeks ago

Yep, that worked! I'm closing this now. Thanks!