Miniconda unicode decode error in latest fmriprep singularity version

I am using the latest singularity container (20.2.1) on a HPC (with SLURM) and it is resulting in a miniconda unicode decode error. I checked all of my .json files and they seem to be utf-8 conform.

I would be thankful for any ideas or pointers and please let me know if you want any additional information. Thank you so much for your help!


unset PYTHONPATH; singularity run --cleanenv --bind /scratch/haum92/main/rawdata_bids:/data --bind /scratch/haum92/main/derivatives/fmriprep:/out
–participant_label $SUBJECT
–nthreads $SLURM_CPUS_PER_TASK --omp-nthreads $SLURM_CPUS_PER_TASK
–fs-license-file /data/code/license.txt
/data /out participant


/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/ UserWarning: The ability to pass arguments to BIDSLayout that control indexing is likely to be removed in future; possibly as early as PyBIDS 0.14. This includes the config_filename, ignore, force_index, and index_metadata arguments. The recommended usage pattern is to initialize a new BIDSLayoutIndexer with these arguments, and pass it to the BIDSLayout via the indexer argument.
warnings.warn(“The ability to pass arguments to BIDSLayout that control "
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 17, in main
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/”, line 602, in parse_args
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/”, line 617, in from_dict
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/”, line 218, in load
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/”, line 453, in init
File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/”, line 155, in init
File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/”, line 111, in call
File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/”, line 280, in _index_metadata
payload = json.load(handle)
File “/usr/local/miniconda/lib/python3.7/json/”, line 293, in load
return loads(,
File “/usr/local/miniconda/lib/python3.7/”, line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xb0 in position 37: invalid start byte

1 Like

Just a quick update: I get exactly the same error message when running it with docker on my local machine.

If anyone should ever run into the same error: the solution in my case was to check the encoding of hidden files in my folder structures and delete all hidden files in the binary format. I did not have any problems with running the analysis after deleting these files.