An error occurred while running fmriprep

Summary of what happened:

The error message is shown in the following image.

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

docker run --rm -v /home/zhouyuan/fan/Data/Data_GL/tmp_2/:/wd -v /home/zhouyuan/fan/Data/Data_GL/BIDS_Data/youngHC/:/input -v /home/zhouyuan/fan/Data/Data_GL/out/:/out -v /home/zhouyuan/fan/freesurferlicense:/freesurfer_license nipreps/fmriprep:latest /input /out participant -w /wd --output-spaces T1w MNI152NLin6Asym:res-2 MNI152NLin2009cAsym:res-2 --fs-license-file /freesurfer_license/license.txt --cifti 91k --skip-bids-validation

Version: fmriprep 23.1.4

Environment (Docker, Singularity, custom installation):

Docker

Data formatted :

Hi @Donggua,

May you try adding —it after —rm in your Docker arguments? Also try removing the —skip-bids-validation argument and sharing the results of validation.

Best,
Steven

1 Like

After modifying the execution command, a new error occurred. :face_exhaling:

docker run --rm -it -v /home/zhouyuan/fan/Data/Data_GL/tmp_2/:/wd -v /home/zhouyuan/fan/Data/Data_GL/BIDS_Data/youngHC/:/input -v /home/zhouyuan/fan/Data/Data_GL/out/:/out -v /home/zhouyuan/fan/freesurferlicense:/freesurfer_license nipreps/fmriprep:latest /input /out participant -w /wd --output-spaces T1w MNI152NLin6Asym:res-2 MNI152NLin2009cAsym:res-2 --fs-license-file /freesurfer_license/license.txt --cifti 91k 

error message


*bids-validator@1.11.0
(node:9) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
	1: [ERR] This file ends in the .gz extension but is not actually gzipped. (code: 28 - GZ_NOT_GZIPPED)
		./sub-HC001/anat/sub-HC001_T1w.nii.gz
		./sub-HC001/func/sub-HC001_task-rest_bold.nii.gz
		./sub-HC002/anat/sub-HC002_T1w.nii.gz
		./sub-HC002/func/sub-HC002_task-rest_bold.nii.gz
		./sub-HC003/anat/sub-HC003_T1w.nii.gz
		./sub-HC003/func/sub-HC003_task-rest_bold.nii.gz
		./sub-HC004/anat/sub-HC004_T1w.nii.gz
		./sub-HC004/func/sub-HC004_task-rest_bold.nii.gz
		./sub-HC005/anat/sub-HC005_T1w.nii.gz
		./sub-HC005/func/sub-HC005_task-rest_bold.nii.gz
		... and 48 more files having this issue (Use --verbose to see them all).

	Please visit https://neurostars.org/search?q=GZ_NOT_GZIPPED for existing conversations about this issue.

	1: [WARN] The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification. (code: 101 - README_FILE_MISSING)

	Please visit https://neurostars.org/search?q=README_FILE_MISSING for existing conversations about this issue.

	2: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered because there are no authors, which will make DOI registration from dataset metadata impossible. (code: 113 - NO_AUTHORS)

	Please visit https://neurostars.org/search?q=NO_AUTHORS for existing conversations about this issue.

        Summary:                 Available Tasks:        Available Modalities: 
        117 Files, 2.14GB                                MRI                   
        29 - Subjects                                                          
        1 - Session                                                            


	If you have any questions, please post on https://neurostars.org/tags/bids.
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/bin/fmriprep", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/cli/run.py", line 43, in main
    parse_args()
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/cli/parser.py", line 812, in parse_args
    validate_input_dir(config.environment.exec_env, opts.bids_dir, opts.participant_label)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/utils/bids.py", line 185, in validate_input_dir
    subprocess.check_call(['bids-validator', str(bids_dir), '-c', temp.name])
  File "/opt/conda/envs/fmriprep/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bids-validator', '/input', '-c', '/tmp/tmpzkxeoenf.json']' returned non-zero exit status 1.*

Hi @Donggua,

Can you talk about how you prepared the data?

Best,
Steven

Hi Steven,
The original data files had the extension “.nii”, but when organizing these data into BIDS format, I renamed them with the extension “.nii.gz” .

Hi @Donggua,

You would need to use the gzip command for that. But, BIDS should also accept .nii so try removing all the .gz from the file names.

Best,
Steven

Thank you so much, once again you have solved my problem. :handshake:

1 Like