Fmriprep error - Preprocessing did not finish successfully

Dear Community,

I gave fmriprep my first go yesterday on one participant. This morning I have noticed that the preprocessing did not finish correctly. This is the error in the log:

Node: fmriprep_wf.single_subject_3000_wf.func_preproc_ses_2_task_AgeRep_run_018_wf.bold_std_trans_wf.bold_to_std_transform
Working directory: /scratch/fmriprep_wf/single_subject_3000_wf/func_preproc_ses_2_task_AgeRep_run_018_wf/bold_std_trans_wf/_std_target_MNI152NLin2009cAsym.resnative/bold_to_std_transform

Node inputs:

args =
copy_dtype = True
default_value = 0.0
dimension =
environ = {}
float = True
input_image =
input_image_type =
interpolation = LanczosWindowedSinc
interpolation_parameters =
invert_transform_flags =
num_threads = 3
out_postfix = _trans
output_image =
print_out_composite_warp_file =
reference_image =
save_cmd = True
transforms =

Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/”, line 67, in run_node
result[“result”] =
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/”, line 516, in run
result = self._run_interface(execute=True)
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/”, line 635, in _run_interface
return self._run_command(execute)
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/”, line 741, in _run_command
result =
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/”, line 428, in run
runtime = self._run_interface(runtime)
File “/usr/local/miniconda/lib/python3.7/site-packages/niworkflows/interfaces/”, line 172, in _run_interface
zip(in_files, xfms_list)
File “/usr/local/miniconda/lib/python3.7/concurrent/futures/”, line 586, in result_iterator
yield fs.pop().result()
File “/usr/local/miniconda/lib/python3.7/concurrent/futures/”, line 425, in result
return self.__get_result()
File “/usr/local/miniconda/lib/python3.7/concurrent/futures/”, line 384, in __get_result
raise self._exception
File “/usr/local/miniconda/lib/python3.7/concurrent/futures/”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/miniconda/lib/python3.7/site-packages/niworkflows/interfaces/”, line 234, in _applytfms
runtime =
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/”, line 428, in run
runtime = self._run_interface(runtime)
File “/usr/local/miniconda/lib/python3.7/site-packages/niworkflows/interfaces/”, line 48, in _run_interface
message="%s (niworkflows v%s)" % (, version),
File “/usr/local/miniconda/lib/python3.7/site-packages/niworkflows/interfaces/”, line 239, in _copyxform
File “/usr/local/miniconda/lib/python3.7/site-packages/nibabel/”, line 333, in to_filename
File “/usr/local/miniconda/lib/python3.7/site-packages/nibabel/”, line 1007, in to_file_map
data = np.asanyarray(self.dataobj)
File “/usr/local/miniconda/lib/python3.7/site-packages/numpy/core/”, line 553, in asanyarray
return array(a, dtype, copy=False, order=order, subok=True)
File “/usr/local/miniconda/lib/python3.7/site-packages/nibabel/”, line 391, in array
arr = self._get_scaled(dtype=dtype, slicer=())
File “/usr/local/miniconda/lib/python3.7/site-packages/nibabel/”, line 358, in _get_scaled
scaled = apply_read_scaling(self._get_unscaled(slicer=slicer), scl_slope, scl_inter)
File “/usr/local/miniconda/lib/python3.7/site-packages/nibabel/”, line 337, in _get_unscaled
File “/usr/local/miniconda/lib/python3.7/site-packages/nibabel/”, line 519, in array_from_file
File “indexed_gzip/indexed_gzip.pyx”, line 635, in
indexed_gzip.indexed_gzip.CrcError: CRC/size validation failed - the GZIP data might be corrupt

I wonder what the issue is here. Can anyone kindly tell me what was wrong please?
Thank you

Hi Loris!

Knowing some information might help us understand the problem better.

  1. Has the dataset been BIDS validated?
  2. What is your command for running fMRIprep? Are you using Singularity/Docker or a python installation? How much memory/CPU are you devoting to it?
  3. Is the problem only with this subject?


Hi Steven!

Thank you for your reply.

  1. The BIDS dataset has been fully validated. I uploaded it in a BIDS validator and apart from few warnings, there were no errors.
  2. Below is the command I used.
    fmriprep-docker E:\ERDeg\BIDS\loris_berlin_project E:\ERDeg\BIDS\loris_berlin_project\derivatives participant --fs-license-file E:\ERDeg\BIDS\loris_berlin_project\derivatives\license.txt --participant-label sub-3000 --nthreads 4 --fs-no-reconall --skip-bids-validation -w E:\ERDeg\BIDS\temp_file

I am using the Docker. I don not know how much memory/CPU I devoted to it since I could not change it from the Docker. When I go to settings —> resources, I can only see this:

It does not seem straightforward as I saw in the documentation

  1. The problem is only with this subject as it is the only one I tested preprocessing with so far


Hi Loris,

Good to know it’s fully validated! The command looks fine. Try running another subject and see if you get the same error first. A corrupt GZIP (as the error suggests) might be subject specific.


Hi Steven,

Sure. I will run it now and let you know tomorrow if I have issues.
Thank you

Hi Steven,

I managed to solve the problem. I do not know how, but when I reran it after removing the dummy scans and performing SDC correction it worked fine.

Two more things:

  1. I have noticed that in the output I have only functional images in MNI space. However, I would also have slice timed and realigned functional images (basically minimally preprocessed in native space) since I need to perform Rrepresentational Similarity analysis in native space. How can I output that?

  2. I also ran AROMA. Does AROMA apply smoothing to the data? MNI images appear very blurred.

Thank you very much

  1. Adding --output-spaces T1w to the fmriprep will align the bold image to the subject’s structural image. If you still have the working directory from when you first ran fmriprep then this should not take long to run.
  2. Yes, AROMA does apply smoothing (6mm FWHM kernel). Also note that the MNI space for AROMA (MNI152NLin6Asym) is different than the space for default fmriprep outputs that you likely already have (MNI152NLin2009cAsym).


Hi Steven,

Thank you so much. Could I also output both, i.e., MNI and T1w.? What shall I write in that case?
Thank you again

best wishes

You can include both T1w and MNI152NLin2009cAsym in that list (separated by a space).

1 Like

Hi Loris,

I’m struggling with a similar issue. I get a similar error that the GZIP data might be corrupt in line 635. Can you please tell me how you fixed it or what steps you took and didn’t see this error again?

Many thanks and looking forward to hearing from you.



You can try reconverting your dicoms to niftis.

I did try reconverting DICOMs to Niftis several times but I still get the same erorr.

I used MRIcron. Is there another website you would recommend?

Dcm2niix or dcm2bids (both are built off of dcm2niix but dcm2bids also does bids naming and organization)

I used dcm2nii in Matlab with the BIDS output format but still get the same error.

I get crash errors in these files:

crash-20210826-135815-root-recon_report-b382d9b4-02e2-4ebf-8c16-1fef3e5f9522.txt (2.2 KB) crash-20210826-135851-root-mri_coreg-96822864-241a-4cc6-a9ae-668c24cf2e61.txt (4.2 KB) crash-20210826-135929-root-mri_coreg-b54ecc15-25cb-4dfc-9fc8-c2e19017ecc9.txt (4.2 KB) crash-20210826-140006-root-mri_coreg-7a227cd5-4f9c-46c2-9f7c-fa553b54867f.txt (4.2 KB)

I’ve been struggling with this error for days and don’t know what to do. Maybe there’s something I’m not seeing here.

dcm2nii in MATLAB might be deprecated, try the command line version of dcm2niix, it is still under activate development

Can you recommend other options please?

You can try GitHub - icometrix/dicom2nifti

I really appreciate your help, @Steven :slight_smile:

Hi again @Steven,

I followed your instructions and reconverted DICOMs to Niftis. However, I still get the same errors in the crash reports. I also tried the following:

  1. I used MRIcron and MRIcroGL (dcm2niix) to reconvert DICOMs to Niftis.
  2. I tried re-downloading 7-Zip Manager.
  3. I tried created a new directory.

However, all of the above failed.

In addition to these errors, I realised that the anatomical pre-processing is complete but functional pre-processing is incomplete.

I would be so grateful if you could provide me some guidance or suggestions on how I can resolve these errors.

Thank you in advance for your help.

Best wishes,


Have you tried to visualize the files using FSLEYES, Freeview, Mango, etc? Does running fslinfo on the the files give you outputs that look correct? Perhaps the dicoms are just corrupt. In that case you can try to reacquire them from the scanner, or just forget the subject and move on.