fmriprep: During the process: indexed_gzip.indexed_gzip.ZranError: zran_read returned error (-3)
Hello Experts, i have a bids format folder (I checked this in BIDS validatior) and tried to use smriprep (later also fmriprep) in the docker on a single subject.
Exact command line:
docker run --rm -e DOCKER_VERSION_8395080871=19.03.13 -it -v /Users/../license.txt:/opt/freesurfer/license.txt:ro -v /Users/../smri-test:/data:ro -v /Users/.../smri-test/fsl-license:/out -v /Users/ali:/scratch nipreps/smriprep:0.7.0 /data /out participant --participant-label OAS30001 --fs-no-reconall --nthreads 4 --stop-on-first-crash --mem_gb 25 -w /scratch
It seems to work in the beginning but while it is running a strange error message appears:
201110-18:08:20,645 nipype.interface WARNING:
Changing /out/smriprep/sub-OAS30001/ses-d0129/anat/sub-OAS30001_ses-d0129_run-2_desc-brain_mask.nii.gz dtype from int16 to uint8
201110-18:08:23,354 nipype.workflow WARNING:
Storing result file without outputs
201110-18:08:23,358 nipype.workflow WARNING:
[Node] Error on "smriprep_wf.single_subject_OAS30001_wf.anat_preproc_wf.anat_derivatives_wf.ds_t1w_preproc" (/scratch/smriprep_wf/single_subject_OAS30001_wf/anat_preproc_wf/anat_derivatives_wf/ds_t1w_preproc)
201110-18:08:23,363 nipype.workflow ERROR:
Node ds_t1w_preproc failed to run on host ec88f6a5959a.
201110-18:08:23,369 nipype.workflow ERROR:
Saving crash info to /out/smriprep/sub-OAS30001/log/20201110-173803_7849de25-30b7-4b1b-8514-b9c61462a666/crash-20201110-180823-root-ds_t1w_preproc-bcd936f9-2e79-4771-ae1d-6d28e5f57437.txt
Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 344, in _send_procs_to_workers
self.procs[jobid].run(updatehash=updatehash)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
result = self._run_interface(execute=True)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
return self._run_command(execute)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
result = self._interface.run(cwd=outdir)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 419, in run
runtime = self._run_interface(runtime)
File "/usr/local/miniconda/lib/python3.7/site-packages/niworkflows/interfaces/bids.py", line 588, in _run_interface
nii = nb.load(out_file, mmap=False)
File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/loadsave.py", line 50, in load
is_valid, sniff = image_klass.path_maybe_image(filename, sniff)
File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/filebasedimages.py", line 510, in path_maybe_image
sniff)
File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/filebasedimages.py", line 458, in _sniff_meta_for
binaryblock = fobj.read(sniff_nbytes)
File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/openers.py", line 160, in read
return self.fobj.read(*args, **kwargs)
File "indexed_gzip/indexed_gzip.pyx", line 578, in indexed_gzip.indexed_gzip._IndexedGzipFile.readinto
indexed_gzip.indexed_gzip.ZranError: zran_read returned error (-3)
Preprocessing did not finish successfully. Errors occurred while processing data from participants: OAS30001 (1). Check the HTML reports for details.
sMRIPrep: Please report errors to https://github.com/nipreps/smriprep/issues
I really don’t know what to do, it doesn’t work with fmriprep either. Docker also has a memory of 16 GB and 12 CPU.
But I noticed that in the new folder smriprep (fmriprep also) created is a nii.gz file that can’t be unzipped. The created not working nii.gz of smriprep : sub-OAS30001_ses-d0129_run-2_desc-preproc_T1w.nii.gz
it seems that there is a nii.gz created by smriprep or fmriprep that is not zipped but ends with .gz.
I can’t unzip this file even with “gunzip”.
I have smriprep version 0.7.0 and fmriprep version 20.2.1
I am very grateful for your help.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 57 (24 by maintainers)
Hello @effigies , sorry to bother you but have you seen what the problem is?
Thanks in advance
Yeah, my rough diagnosis is that somewhere internal to the workflow, we’re writing out an uncompressed NIfTI file to
.nii.gz
, which is getting passed around until finally some interface tries to look at it.The fact that you’re seeing it consistently while I am utterly unable to reproduce it using the same Docker image on the same file is what makes this so hard. I may not be able to until Monday, but I will try to give you a process that will allow you to bundle up your working directory so I can examine it.
Thanks. If I can get hold of the data, I’ll try to reproduce.
i can see that the input T1w file ends with nii.gz at the end and i can unzip it with “gunzip” and i can open it with nibabel.
What I noticed then is that during the process smriprep or fmriprep created a new folder with 2 nii.gz files: sub-OAS30001_ses-d0129_run-2_desc-brain_mask.nii.gz sub-OAS30001_ses-d0129_run-2_descpreproc_T1w.nii.gz
I can also unzip the file sub-OAS30001_ses-d0129_run-2_desc-brain_mask.nii.gz and open it with nibabel.
But the file sub-OAS30001_ses-d0129_run-2_descpreproc_T1w.nii.gz I can neither unzip it nor open it with nibabel, this shows an error message, it looks like the file has not been compressed by fmriprep or so because that would be created during the process. I cannot do anything with this file.