Unusual "ENOENT" error when trying to run fMRIPrep

Summary of what happened:

Hi! I’m new to using fMRIprep and am experiencing an error when trying to run an example tutorial. The tutorial I’m following is this one: Using fmriprep for fMRI data preprocessing | by Gelana Tostaeva | Medium. I’ve cloned and copied the entire dataset for the tutorial and I have got the following error when trying to run fMRIPrep. Can anyone figure out what this is all about as I’m a little stuck! Thanks in advance!

Command used (and if a helper script was used, a link to the helper script or the command generated):

fmriprep-docker \
/Users/steve/ml_projects/fMRIprep/data/ds000052/ \
/Users/steve/ml_projects/fMRIprep/data/ds000052/output \
participant \
--participant-label 01 \
--fs-license-file /Users/steve/ml_projects/fMRIprep/license.txt

This translates to a call of:

docker run \
--rm \
-e DOCKER_VERSION_8395080871=26.1.4 \
-it \
-v /Users/steve/ml_projects/fMRIprep/license.txt:/opt/freesurfer/license.txt:ro \
-v /Users/steve/ml_projects/fMRIprep/data/ds000052:/data:ro \
-v /Users/steve/ml_projects/fMRIprep/data/ds000052/output:/out \
nipreps/fmriprep:24.0.0 \
/data /out participant \
--participant-label 01



Environment (Docker, Singularity / Apptainer, custom installation):

macOs Monterey
Macbook pro (16-inch 2019)
Processor 2,6 Ghz 6-Core intel Core I7
Memory 16 GB 2667 MHz DDR4
Startup Disk Macintosh HD

Data formatted according to a validatable standard? Please provide the output of the validator:


Relevant log outputs (up to 20 lines):

Warning: <8GB of RAM is available within your Docker environment.
Some parts of fMRIPrep may fail to complete.
Continue anyway? [y/N]y
RUNNING: docker run --rm -e DOCKER_VERSION_8395080871=26.1.4 -it -v /Users/steve/ml_projects/fMRIprep/license.txt:/opt/freesurfer/license.txt:ro -v /Users/steve/ml_projects/fMRIprep/data/ds000052:/data:ro -v /Users/steve/ml_projects/fMRIprep/data/ds000052/output:/out nipreps/fmriprep:24.0.0 /data /out participant --participant-label 01
(node:9) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
Unhandled rejection (
  reason: Error: ENOENT: no such file or directory, scandir '/data/.git/annex/objects/W5'

Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/bin/fmriprep", line 8, in <module>
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/cli/run.py", line 40, in main
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/cli/parser.py", line 903, in parse_args
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/utils/bids.py", line 245, in validate_input_dir
    subprocess.check_call(['bids-validator', str(bids_dir), '-c', temp.name])  # noqa: S607
  File "/opt/conda/envs/fmriprep/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bids-validator', '/data', '-c', '/tmp/tmp_356zewm.json']' returned non-zero exit status 3.
fMRIPrep: Please report errors to https://github.com/nipreps/fmriprep/issues

Screenshots / relevant information:

Hi @Steve_Sizzou,

For future posts like this, please organize and categorize your post to the Software Support category template. You can see I did it for you this time.

In regards to your error, I am guessing you used Datalad or something to clone the repository, and the symlinks involved in that are confusing Docker. You might have more success using the docker run method and being more hands on with binding drives to the container, as symlinks often require more careful consideration. In particular, not renaming the drive when mounting, or mounting a drive as itself, may help.