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!

Input:

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

Error:

/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/validation.py:46: 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
sys.exit(main())
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/run.py”, line 17, in main
parse_args()
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/parser.py”, line 602, in parse_args
config.from_dict(vars(opts))
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/config.py”, line 617, in from_dict
execution.load(settings)
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/config.py”, line 218, in load
cls.init()
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/config.py”, line 453, in init
re.compile(r”^."),
File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py”, line 155, in init
indexer(self)
File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/index.py”, line 111, in call
self._index_metadata()
File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/index.py”, line 280, in _index_metadata
payload = json.load(handle)
File “/usr/local/miniconda/lib/python3.7/json/init.py”, line 293, in load
return loads(fp.read(),
File “/usr/local/miniconda/lib/python3.7/codecs.py”, 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.