nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
629 stars 291 forks source link

File not found error - possibly related to template folder #3233

Closed rmeaso317 closed 6 months ago

rmeaso317 commented 7 months ago

What happened?

We recently installed fMRI prep and successfully ran two test participants with no errors reported. We then attempted to run a participant with a pediatric template and it produced file not found errors. We then reverted to using the default MNI adult template but the same errors were produced. We suspect that the errors might be related to template files being moved when attempting to switch to the pediatric template (I do not know what files were moved, someone else did this).

The errors do not stop the final html file from being produced, and the results in that file look roughly the same as the ones from the original test participants that had no errors in them.

We have run through all of the system checks for fMRIprep and solved the few issues that arose with that, rerun a participant, and produced the same error ~30 minutes into the run.

We are using a data set downloaded from OpenNeuro (link if it is helpful)

What command did you use?

RUNNING: docker run --rm -e DOCKER_VERSION_8395080871=25.0.2 -it -v /Volumes/ITALY/license.txt:/opt/freesurfer/license.txt:ro -v /Volumes/ITALY/raw:/data:ro -v /Volumes/ITALY/derivatives:/out -v /Volumes/ITALY/tmp:/scratch nipreps/fmriprep:23.2.0 /data /out participant --skip_bids_validation --participant_label 016 --dummy-scans 0 -w /scratch --output-spaces MNI152NLin2009cAsym

What version of fMRIPrep are you running?

23.2.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.

Node: fmriprep_23_2_wf.sub_016_wf.anat_fit_wf.ds_template_wf.ds_t1w_ref_xfms
Working directory: /scratch/fmriprep_23_2_wf/sub_016_wf/anat_fit_wf/ds_template_wf/ds_t1w_ref_xfms

Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/utils.py", line 94, in nodelist_runner
    result = node.run(updatehash=updatehash)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 543, in run
    write_node_report(self, result=result, is_mapnode=isinstance(self, MapNode))
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/utils.py", line 208, in write_node_report
    report_file.write_text("\n".join(lines), encoding='utf-8')
  File "/opt/conda/envs/fmriprep/lib/python3.10/pathlib.py", line 1154, in write_text
    with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
  File "/opt/conda/envs/fmriprep/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/scratch/fmriprep_23_2_wf/sub_016_wf/anat_fit_wf/ds_template_wf/ds_t1w_ref_xfms/mapflow/_ds_t1w_ref_xfms1/_report/report.rst'

Additional information / screenshots

No response

effigies commented 6 months ago

What happens if you delete the modified template directory? The templates needed to run MNI152NLin2009cAsym should be included in the docker image.

rmeaso317 commented 6 months ago

It seems like the issue was with our external hard drive. It has plenty of space for the data but is pretty old so we think it was either struggling to keep up with writing and copying files or it was caused my some weird read/write permissions.

More details on the troubleshooting and solution in this post on NeuroStars.