fmriprep: CRCError for NIfTI in working directory
@effigies and @mgxd Thanks. Now I was able to process one subject fMRI data without any errors and I still didn’t get a time to check those results. I also processed two other subjects and got the following two different errors from them.
Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
result = self._run_interface(execute=True)
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
return self._run_command(execute)
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
result = self._interface.run(cwd=outdir)
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 428, in run
runtime = self._run_interface(runtime)
File "/usr/local/miniconda/lib/python3.8/site-packages/niworkflows/interfaces/nibabel.py", line 191, in _run_interface
img_4d = nb.concat_images(nii_list)
File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/funcs.py", line 141, in concat_images
raise ValueError(f'Affine for image {i} does not match affine for first image')
ValueError: Affine for image 3 does not match affine for first image
Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
result = self._run_interface(execute=True)
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
return self._run_command(execute)
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
result = self._interface.run(cwd=outdir)
File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 428, in run
runtime = self._run_interface(runtime)
File "/usr/local/miniconda/lib/python3.8/site-packages/niworkflows/interfaces/nilearn.py", line 176, in _run_interface
new_nii = concat_imgs(self.inputs.in_files, dtype=self.inputs.dtype)
File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg_conversions.py", line 471, in concat_niimgs
niimg = check_niimg(niimg, ensure_ndim=ndim)
File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg_conversions.py", line 283, in check_niimg
niimg = load_niimg(niimg, dtype=dtype)
File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg.py", line 134, in load_niimg
dtype = _get_target_dtype(_get_data(niimg).dtype, dtype)
File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg.py", line 24, in _get_data
data = np.asanyarray(img._dataobj)
File "/usr/local/miniconda/lib/python3.8/site-packages/numpy/core/_asarray.py", line 171, in asanyarray
return array(a, dtype, copy=False, order=order, subok=True)
File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 391, in __array__
arr = self._get_scaled(dtype=dtype, slicer=())
File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 358, in _get_scaled
scaled = apply_read_scaling(self._get_unscaled(slicer=slicer), scl_slope, scl_inter)
File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 332, in _get_unscaled
return array_from_file(self._shape,
File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/volumeutils.py", line 519, in array_from_file
infile.seek(offset)
File "indexed_gzip/indexed_gzip.pyx", line 651, in indexed_gzip.indexed_gzip._IndexedGzipFile.seek
indexed_gzip.indexed_gzip.CrcError: CRC/size validation failed - the GZIP data might be corrupt (file: /gpfs/projects/fmriprep/scR21_outputs_Sep_2021_N/derivatives/scratch/fmriprep_wf/single_subject_50144_wf/func_preproc_ses_1_task_RSFC_run_4_wf/bold_t1_trans_wf/bold_to_t1w_transform/vol0412_xform-00412.nii.gz)
_Originally posted by @sameera2004 in https://github.com/nipreps/fmriprep/issues/2534#issuecomment-922476583_
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 25 (8 by maintainers)
@pauldmccarthy @effigies I just want to report back after upgrading indexed-gzip 1.6.4. It fixed the error and the subject’s data is processed completely without errors. Thank you so much.
20.2.6 is now available on docker hub and should resolve this error - please reopen if it does not!
Yes, I was able to preprocess the 6 subjects data without any issue this time. I didn’t see this error again. We will compare the outputs and let you know whether it solved the SDC issue. Thank you.
@effigies and @pauldmccarthy,I am so sorry I have been busy with so many other projects. Therefore, I didn’t get a time to check this. Last Friday, I reran the analysis after deleting the directory. However, it was not successful. I will check those error reports and share you an image by tomorrow. Thank you so much.