Fmriprep 20.1.1 does not run after BIDS validation - error on unhashable type 'dict'

Hi all,

I am trying to run fmriprep using singularity 3.4.2 and fmriprep version 20.1.1. I build fmriprep using the singularity 3.4.2 version via fmriprep’s docker hub container as shown here.

This is the fmriprep call I used:

fmriprep /mnt/data/All_subjects /mnt/data/All_subjects/derivatives participant --task-id confidence --verbose --fd-spike-threshold 0.5 --fs-no-reconall -w /mnt/work --n-cpus 16 --omp-nthreads 16 --fs-license-file $PWD/license.txt

I’m running into an error, however, for which I did not find a solution yet. This is the error I got, there are no log files / error files in the derivatives or work directories though:

Making sure the input data is BIDS compliant (warnings can be ignored in most cases).


*1: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered because there are no authors, which will make DOI registration from dataset metadata impossible. (code: 113 - NO_AUTHORS)

*Please visit for existing conversations about this issue.

*Summary: Available Tasks: Available Modalities:

1984 Files, 149.19GB confidence T1w

126 - Subjects bold

1 - Session events

*If you have any questions, please post on

Traceback (most recent call last):
*File “/usr/local/miniconda/bin/fmriprep”, line 10, in
*File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/”, line 24, in main
*File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/utils/”, line 57, in sentry_setup
*for k, v in config.get(flat=True).items():
*File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/”, line 570, in get
*‘execution’: execution.get(),
*File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/”, line 202, in get
*v = str(v)
*File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/”, line 312, in repr

TypeError: unhashable type: ‘dict’
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

I tried deleting the –ncpus and –omp-nthreads options, and I tried pre-processing only a single subject, but I get the same error message. I also verified that the data are actually BIDS compliant with the validator. Moreover, I rearranged the order of the call (all the options first and input + output dir last), that did not work as well.

When I use an older version of singularity (2.5.2) and fmriprep (1.5.3) with the same call, it all works perfectly fine.

It would be great if someone can help me with this error. Thank you very much for your help! Greatly appreciate it!


At first glance, this looks like a problem when converting your BIDSLayout to a string. Could you rerun the command you used, but replace the --verbose flag with -vvv to increase verbosity?

Thank you for thinking along!
I reran the command with the -vvv flag. However, the error remains exactly the same, so that didn’t give me any additional information on the error, unfortunately.

Okay, let’s try to reproduce this minimally.

import sys
import os
import re
from bids import BIDSLayout, __version__

bids_dir = os.path.abspath(sys.argv[-1])

layout = BIDSLayout(
                ignore=("code", "stimuli", "sourcedata", "models",
                        "derivatives", re.compile(r'^\.'))

print("Using pybids version: %s" % __version__)

If you save this to a file and call it via python <> <path-to-bids-directory> we should expect to see the same error. This assumes you have the same version of pybids installed as inside the container.

Hi @monjahoven, could you either (or both):