FMRIPREP ValueError: 'desc' is not a recognized entity

Hi everyone,

For many of our participants who I am running through fmriprep (version 20.2.1), I get this error message:

ValueError: ‘desc’ is not a recognized entity. If you’re sure you want to impose this constraint, set invalid_filters=‘allow’.

–skip-bids-validation --omp-nthreads 8 --nthreads 12 --mem_mb 30000 --skull-strip-template MNIPediatricAsym:cohort-4 --output-spaces MNIPediatricAsym:res-2:cohort-4 --fs-no-reconall --dummy-scans 6 --fs-license-file /ELS_BIDS_longitudinal/freesurfer_license/license.txt --fs-subjects-dir /ELS-T1/derivatives/freesurfer-6.0.1

I have checked the json files and compared them to those subjects who run successfully, so I’m not quite sure where to turn next to troubleshoot. I appreciate any advice.

Sincerely,
Jackie

Does the dataset validate properly? --skip-bids-validation might be hiding the root cause.

Assuming that your dataset is valid, we would need a full traceback to find where in the code this error is being raised, and the full command would dbe helpful, as would a listing of your dataset (e.g., tree /path/to/dataset).

Thank you for pointing this out! I realized there was an error in my path :woman_facepalming:

Edit: I updated to the docker to fMRIPrep 20.2.6, as well as updating fmriprep-docker with pip, and it is working now.

I have this error myself.
BIDS structure is valid.
I created a free surfer folder in derivatives, no luck.
I created a sub-01 inside that folder, also did not help.
Not sure where to go with this.

Should I instead report it on GitHub as the message says?

(base) Johns-iMac-Pro :: fmri/fmri_rs/code » ./fmriprep sub-01
RUNNING: docker run --rm -e DOCKER_VERSION_8395080871=20.10.8 -it -v /Users/john/.freesurfer/license.txt:/opt/freesurfer/license.txt:ro -v /Volumes/Data/Research/fmri/fmri_rs:/data:ro -v /Volumes/Data/Research/fmri/fmri_rs/derivatives:/out nipreps/fmriprep:20.2.3 /data /out participant --skull-strip-t1w=force --skip_bids_validation --participant-label sub-01 --mem_mb 5000 --nthreads 8 --output-spaces MNI152NLin2009cAsym
You are using fMRIPrep-20.2.3, and a newer version of fMRIPrep is available: 20.2.6.
Please check out our documentation about how and when to upgrade:
https://fmriprep.readthedocs.io/en/latest/faq.html#upgrading
211107-17:01:18,872 nipype.workflow IMPORTANT:

    Running fMRIPREP version 20.2.3:
      * BIDS dataset path: /data.
      * Participant list: ['01'].
      * Run identifier: 20211107-170024_797f3e7e-646b-4416-90a6-2f6099ccf7ec.
      * Output spaces: MNI152NLin2009cAsym:res-native.
      * Pre-run FreeSurfer's SUBJECTS_DIR: /out/freesurfer.
Process Process-2:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/local/miniconda/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/workflow.py", line 82, in build_workflow
    retval["workflow"] = init_fmriprep_wf()
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/base.py", line 64, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/base.py", line 304, in init_single_subject_wf
    func_preproc_wf = init_func_preproc_wf(bold_file)
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/bold/base.py", line 206, in init_func_preproc_wf
    sbref_files = layout.get(return_type='file', **entities)
  File "/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py", line 631, in get
    raise ValueError(msg + "If you're sure you want to impose "
ValueError: 'desc' is not a recognized entity. If you're sure you want to impose this constraint, set invalid_filters='allow'.
fMRIPrep: Please report errors to https://github.com/nipreps/fmriprep/issues

real	1m1.758s
user	0m0.657s
sys	0m0.501s

I am also getting this error. It comes up when I re-run a participant after a successful completion without errors. I remove the subject’s derivatives directory and freesurfer directory. It’s puzzling that this only comes up after re-running.

Here is the log:

singularity run --cleanenv /u/project/apps/fmriprep/rh7/23.1.3//23.1.3-fmriprep.sif /u/project//data/mri/crave/BIDS /u/project/data/mri/crave/BIDS/derivatives --skip_bids_validation --ignore fieldmaps --fs-subjects-dir /u/project/data/mri/crave/BIDS/derivatives/freesurfer --participant_label sub-108 -t label -w /u/project/data/mri/crave/tmp_fmriprep --output-spaces MNI152NLin2009cAsym func --nthreads 4 --omp-nthreads 4 --mem-mb 32000 --fs-license-file /u/project//apps/freesurfer/rh7/7.1.1/license.txt participant
INFO:    Converting SIF file to temporary sandbox...
WARNING: underlay of /etc/localtime required more than 50 (100) bind mounts
You are using fMRIPrep-23.1.4, and a newer version of fMRIPrep is available: 24.0.0.
Please check out our documentation about how and when to upgrade:
https://fmriprep.readthedocs.io/en/latest/faq.html#upgrading
240801-13:54:39,790 nipype.workflow IMPORTANT:
	 Running fMRIPrep version 23.1.4

         License NOTICE ##################################################
         fMRIPrep 23.1.4
         Copyright 2023 The NiPreps Developers.
         
         This product includes software developed by
         the NiPreps Community (https://nipreps.org/).
         
         Portions of this software were developed at the Department of
         Psychology at Stanford University, Stanford, CA, US.
         
         This software is also distributed as a Docker container image.
         The bootstrapping file for the image ("Dockerfile") is licensed
         under the MIT License.
         
         This software may be distributed through an add-on package called
         "Docker Wrapper" that is under the BSD 3-clause License.
         #################################################################
240801-13:54:39,797 nipype.workflow WARNING:
	 Previous output generated by version 0+unknown found.
240801-13:55:39,243 nipype.workflow IMPORTANT:
	 Building fMRIPrep's workflow:
           * BIDS dataset path: /u/project/data/mri/crave/BIDS.
           * Participant list: ['108'].
           * Run identifier: 20240801-135132_63cb2c10-c032-419e-9b9c-3adaade30b43.
           * Output spaces: MNI152NLin2009cAsym:res-native func.
           * Pre-run FreeSurfer's SUBJECTS_DIR: /u/project/data/mri/crave/BIDS/derivatives/freesurfer.
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/envs/fmriprep/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/cli/workflow.py", line 115, in build_workflow
    retval["workflow"] = init_fmriprep_wf()
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/workflows/base.py", line 93, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/workflows/base.py", line 463, in init_single_subject_wf
    func_preproc_wf = init_func_preproc_wf(bold_file, has_fieldmap=has_fieldmap)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/workflows/bold/base.py", line 279, in init_func_preproc_wf
    sbref_files = layout.get(return_type="file", **sb_ents)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/bids/layout/layout.py", line 679, in get
    raise ValueError(msg + "If you're sure you want to impose "
ValueError: 'desc' is not a recognized entity. If you're sure you want to impose this constraint, set invalid_filters='allow'.
INFO:    Cleaning up image...

This error resolves when I use a slightly later version of fMRIPREP (23.2.0 vs. 23.1.3), but I don’t want to mix versions. All of the other participants have been analyzed using 23.1.3.

Can anyone comment on the key differences between these two versions that would lead to this discrepancy in outcome?