fmriprep icon indicating copy to clipboard operation
fmriprep copied to clipboard

fMRIprep try to access layout_config file in .git folder

Open celprov opened this issue 3 years ago • 1 comments

What happened?

I wanted to run fMRIPrep via docker on a dataset installed locally and handled by datalad. However, the run fails, because fMRIprep tries to access /data/.git/refs/objects/layout_config.json but doesn't have the permissions to access this file. I used to be able to run fMRIprep via docker on this dataset, I can run on this same dataset MRIQC via docker without problem and I can run fMRIprep with the same command line on other datasets.

What command did you use?

docker run -u $( id -u ) -it --rm -v $HOME/code/niworkflows/niworkflows:/opt/conda/lib/python3.8/site-packages/niworkflows:ro -v $HOME/env/freesurfer_license.txt:/opt/freesurfer/license.txt:ro -v /data/datasets/ds000030:/data:ro -v /data/derivatives/fmriprep/RoyalCarpetPlot/UCLA_LA5:/out -v $HOME/tmp/fmriprep/RoyalCarpetPlot/UCLA_LA5:/work nipreps/fmriprep:21.0.0 /data /out participant --participant-label 10249 11105 -w /work --nprocs 12 --omp-nthreads 8 -vv

What version of fMRIPrep are you running?

21.0.0

How are you running fMRIPrep?

Docker

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

/opt/conda/lib/python3.8/site-packages/bids/config.py:39: FutureWarning: Setting 'extension_initial_dot' will be removed in pybids 0.16.
  warnings.warn("Setting 'extension_initial_dot' will be removed in pybids 0.16.",
You are using fMRIPrep-21.0.0, and a newer version of fMRIPrep is available: 21.0.1.
Please check out our documentation about how and when to upgrade:
https://fmriprep.readthedocs.io/en/latest/faq.html#upgrading
Traceback (most recent call last):
  File "/opt/conda/bin/fmriprep", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/cli/run.py", line 38, in main
    parse_args()
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/cli/parser.py", line 668, in parse_args
    config.from_dict(vars(opts))
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/config.py", line 664, in from_dict
    execution.load(settings)
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/config.py", line 238, in load
    cls.init()
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/config.py", line 481, in init
    cls._layout = BIDSLayout(
  File "/opt/conda/lib/python3.8/site-packages/bids/layout/layout.py", line 145, in __init__
    indexer(self)
  File "/opt/conda/lib/python3.8/site-packages/bids/layout/index.py", line 109, in __call__
    self._index_dir(self._layout._root, self._config)
  File "/opt/conda/lib/python3.8/site-packages/bids/layout/index.py", line 193, in _index_dir
    self._index_dir(d, list(config), default_action=default)
  File "/opt/conda/lib/python3.8/site-packages/bids/layout/index.py", line 193, in _index_dir
    self._index_dir(d, list(config), default_action=default)
  File "/opt/conda/lib/python3.8/site-packages/bids/layout/index.py", line 193, in _index_dir
    self._index_dir(d, list(config), default_action=default)
  File "/opt/conda/lib/python3.8/site-packages/bids/layout/index.py", line 163, in _index_dir
    if config_file.exists():
  File "/opt/conda/lib/python3.8/pathlib.py", line 1407, in exists
    self.stat()
  File "/opt/conda/lib/python3.8/pathlib.py", line 1198, in stat
    return self._accessor.stat(self)
PermissionError: [Errno 13] Permission denied: '/data/.git/refs/objects/layout_config.json'

Additional information / screenshots

The dataset is handled by datalad version 0.14.7.

celprov avatar Feb 04 '22 11:02 celprov

we should be excluding .git/ files, so I guess it's possible this path is being resolved after the fact (are you using a layout_config.json file to control indexing?) I'm not sure why this would differ from mriqc, since it looks like both are using the same filters..

i think the easiest fix here would be to remove that file from datalad tracking (assuming you don't need a custom config)

(this seems related to #2194)

mgxd avatar Mar 14 '22 17:03 mgxd