-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zran_seek returned error: -1 #1387
Comments
Hi, I am using 1.2.1. I have checked out the #1356, but I am still confused how to solve it. Is that possible for me to change that setting? |
Ah, then it didn't fix it. That's a shame. Have you tried re-running? Our best guess has been that it's an NFS cache-related issue, and sometimes re-running resolves it. cc @pauldmccarthy Just a heads up that this appears under default nibabel settings (we no longer set |
I have rerun it, but however, I got the same error again. |
I am wondering if I should clean up the work dir when re-running? |
That sometimes helps, but I'm not sure that it would, here. Can you determine the node in which it failed? There are several nodes that use that interface; if we can identify which one, we can try deleting just its inputs, to save you some time. |
sorry I am totally a newbie to the nipype workflow and I don't know how to find the node that failed. here is the output file: looking forward to your further suggestions! |
It looks like the error is on the
Could you look in that folder in the working directory, @Irisfee, and remove its listed inputs before re-running ? |
So perhaps just delete |
I have re-run another time and this time I have got the results successfully. thank you very much @effigies and @emdupre I am just wondering if this bug happens totally random, or it might more likely to happen in some situations? I run 4 subjects together, and I got this problem twice only on one of them. |
I believe it's actually an NFS issue. We can't reliably reproduce it. If deleting the inputs resolved the issue, I'd guess that perhaps it's actually the step before merge that's producing malformed files. Next time you see this, could you zip up that entire directory, and we can try to see if there are some malformed files there? |
Due to some reasons, I rerun all the subjects again, and still, I have the same trouble with that subject. This time, deleting the error node folder doesn't solve the trouble. I can share you with the functional data but I can't share you with the anatomical data without skull-stripping for subject-protecting. Would that help? |
No, we can't reproduce without the anatomicals. But if you're able to tar the |
I have sent the files to your gmail address. thanks |
import nibabel as nb
import glob
for img in glob.glob('bold_to_t1w_transform/*.nii.gz'):
try:
nb.load(img).get_data()
except Exception as err:
print(img)
print(err) bold_to_t1w_transform/vol0109_xform-00109.nii.gz
zran_seek returned error: -1 However, if I uninstall @pauldmccarthy Here's a failing file: vol0109_xform-00109.nii.gz I can open an issue over in indexed_gzip, if you like. |
I wonder if we can do any kind of fallback, so that we can use |
@effigies thanks - super busy right now, but I will look at this as soon as I get a chance. |
@Irisfee Do you think you could just delete @pauldmccarthy Sounds good. I opened an issue on your page, so that you don't have to dig around over here to find it. |
I have deleted that and rerun twice, however, I got the same error twice at this node. So it seems that deleting the workdir doesn't solve the issue now. |
Hello, I got the same error with one of my datasets, although in a slightly different part of the pipeline:
Here is the crash file: I ran it twice, failing the same way both times - but now I will try deleting the files and see whether it succeeds. |
The quick fix will be to remove |
@hstojic If you can find a failing file, could you send it along to @pauldmccarthy in pauldmccarthy/indexed_gzip#15. |
|
Hello!
I am using the same codes to run 4 subjects with fmriprep, and 3 of them were preprocessed successfully, with one subject stopped at the middle.
the error is:
traceback (most recent call last):
File "/usr/local/miniconda/bin/fmriprep", line 11, in
sys.exit(main())
File "/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/cli/run.py", line 342, in main
fmriprep_wf.run(**plugin_settings)
File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/workflows.py", line 595, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/plugins/base.py", line 162, in run
self._clean_queue(jobid, graph, result=result))
File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/plugins/base.py", line 224, in _clean_queue
raise RuntimeError("".join(result['traceback']))
RuntimeError: Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 471, in run
result = self._run_interface(execute=True)
File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 555, in _run_interface
return self._run_command(execute)
File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_command
result = self._interface.run(cwd=outdir)
File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 522, in run
runtime = self._run_interface(runtime)
File "/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/interfaces/nilearn.py", line 126, in _run_interface
new_nii = concat_imgs(self.inputs.in_files, dtype=self.inputs.dtype)
File "/usr/local/miniconda/lib/python3.6/site-packages/nilearn/_utils/niimg_conversions.py", line 449, in concat_niimgs
niimg = check_niimg(niimg, ensure_ndim=ndim)
File "/usr/local/miniconda/lib/python3.6/site-packages/nilearn/_utils/niimg_conversions.py", line 271, in check_niimg
niimg = load_niimg(niimg, dtype=dtype)
File "/usr/local/miniconda/lib/python3.6/site-packages/nilearn/_utils/niimg.py", line 116, in load_niimg
dtype = _get_target_dtype(niimg.get_data().dtype, dtype)
File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/dataobj_images.py", line 202, in get_data
data = np.asanyarray(self._dataobj)
File "/usr/local/miniconda/lib/python3.6/site-packages/numpy/core/numeric.py", line 544, in asanyarray
return array(a, dtype, copy=False, order=order, subok=True)
File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/arrayproxy.py", line 356, in array
raw_data = self.get_unscaled()
File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/arrayproxy.py", line 351, in get_unscaled
mmap=self._mmap)
File "/usr/local/miniconda/lib/python3.6/site-packages/nibabel/volumeutils.py", line 525, in array_from_file
infile.seek(offset)
File "indexed_gzip/indexed_gzip.pyx", line 430, in indexed_gzip.indexed_gzip._IndexedGzipFile.seek
indexed_gzip.indexed_gzip.ZranError: zran_seek returned error: -1
The codes I used for running:
singularity run -e --bind /projects/kuhl_lab/yzhao17:/projects/kuhl_lab/yzhao17 /projects/kuhl_lab/yzhao17/Image/fmriprep.simg /projects/kuhl_lab/yzhao17/DIIN/bids_data /projects/kuhl_lab/yzhao17/DIIN/derivatives participant --participant_label 01 --output-space T1w template fsaverage6 --medial-surface-nan -w /projects/kuhl_lab/yzhao17/DIIN/bids_data/works --resource-monitor --notrack --stop-on-first-crash
The data passed bids format check, and I don't think there is any difference between subjects. I am wondering what's going on.
thank you so much!
The text was updated successfully, but these errors were encountered: