ValueError: A fieldmap or phase-difference estimation type was found, but an anatomical reference (magnitude file) is missing

Ran latest version of dcm2bids - tried also running with previous versions of the file. I also tried re-run fMRIprep using previous versions of fmriprep.

I tried to run fMRIPrep (latest version) with fieldmap correction however, I experienced the following error(s):

FileNotFoundError: File path </work/06953/jes6785/ls6/ALMEIDA_LASER/work/derivates/fmriprep-v22.0.1/sub-LSB104/ses-02/fmap/sub-LSB104_ses-02_fmapid-auto00010_desc-coeff_magnitude.nii.gz> does not exist, is a broken link, or it is not a file

ValueError: A fieldmap or phase-difference estimation type was found, but an anatomical reference (magnitude file) is missing.

I also see a similar problem here.

I shouldn’t have a magnitude image for these files as they are epi images in the opposite phase encoding direction. From my understanding, there shouldn’t be any magnitude images associated with them.

Wondering if my naming convention for the fmap folder might have caused the problem?

│ ├── sub-LSB104_ses-01_rec-norm_T1w.json
│ ├── sub-LSB104_ses-01_rec-norm_T1w.nii.gz
│ ├── sub-LSB104_ses-01_rec-orig_T1w.json
│ └── sub-LSB104_ses-01_rec-orig_T1w.nii.gz

├── fmap
│ ├── sub-LSB104_ses-01_acq-cptpnnd_dir-PA_run-01_epi.json
│ ├── sub-LSB104_ses-01_acq-cptpnnd_dir-PA_run-01_epi.nii.gz
│ ├── sub-LSB104_ses-01_acq-cptpnnd_dir-PA_run-02_epi.json
│ ├── sub-LSB104_ses-01_acq-cptpnnd_dir-PA_run-02_epi.nii.gz
│ ├── sub-LSB104_ses-01_acq-midgainloss_dir-PA_epi.json
│ ├── sub-LSB104_ses-01_acq-midgainloss_dir-PA_epi.nii.gz
│ ├── sub-LSB104_ses-01_acq-rest_dir-PA_run-01_epi.json
│ ├── sub-LSB104_ses-01_acq-rest_dir-PA_run-01_epi.nii.gz
│ ├── sub-LSB104_ses-01_acq-rest_dir-PA_run-02_epi.json
│ ├── sub-LSB104_ses-01_acq-rest_dir-PA_run-02_epi.nii.gz

├── func
│ ├── sub-LSB104_ses-01_task-cptpnnd_dir-AP_run-01_bold.json
│ ├── sub-LSB104_ses-01_task-cptpnnd_dir-AP_run-01_bold.nii.gz
│ ├── sub-LSB104_ses-01_task-cptpnnd_dir-AP_run-02_bold.json
│ ├── sub-LSB104_ses-01_task-cptpnnd_dir-AP_run-02_bold.nii.gz
│ ├── sub-LSB104_ses-01_task-midgainloss_dir-AP_bold.json
│ ├── sub-LSB104_ses-01_task-midgainloss_dir-AP_bold.nii.gz
│ ├── sub-LSB104_ses-01_task-rest_dir-AP_run-01_bold.json
│ ├── sub-LSB104_ses-01_task-rest_dir-AP_run-01_bold.nii.gz
│ ├── sub-LSB104_ses-01_task-rest_dir-AP_run-02_bold.json
│ └── sub-LSB104_ses-01_task-rest_dir-AP_run-02_bold.nii.gz

What command did you use?
singularity run --cleanenv “$fmriprep” “$localnifty” “$fmriprep_output” participant --participant-label “$id” --fs-license-file “$fsl_license” --skip_bids_validation -w “$workingdir”

What version of fMRIPrep are you running?

How are you running fMRIPrep?


May you please post the full relevant log output for this error, which should also include the name of process the node was running? In the beginning of the fmriprep log, did you see that the fieldmaps were being correctly associated based on the values of the fmap JSON IntendedFor fields?

There’s an important difference between this issue and the other one you referenced, in that this issue is looking for a derivative created by fmriprep, while the other error is incorrectly assuming a name of the raw BIDS file.