Fmriprep add nonsteady error

Hello,
I am preprocessing a data set with fMRIPrep version 20.2.0 and am having the same error come up for multiple runs/participants. I’ve pasted the error log for one run below. Sometimes the issue is resolved by running fMRIPrep again (producing expected smoothAROMAnonaggr output), but not always. Any idea what the issue might be?
Thanks!
Steve


Node Name: fmriprep_wf.single_subject_102_wf.func_preproc_ses_01_task_cardguess_run_06_wf.ica_aroma_wf.add_nonsteady

File: /gpfs/group/sjw42/default/ASH/DVAL/bids/derivatives/fmriprep/sub-102/log/20220520-230705_250007cb-3135-42e6-8c00-1f0c27779e1b/crash-20220520-233412-sjw42-add_nonsteady-6ea63764-241f-4969-aaf3-78af2550310b.txt
Working Directory: /gpfs/group/sjw42/default/ASH/DVAL/work/fmriprep_wf/single_subject_102_wf/func_preproc_ses_01_task_cardguess_run_06_wf/ica_aroma_wf/add_nonsteady
Inputs:

bold_cut_file: /gpfs/group/sjw42/default/ASH/DVAL/work/fmriprep_wf/single_subject_102_wf/func_preproc_ses_01_task_cardguess_run_06_wf/ica_aroma_wf/ica_aroma/out/denoised_func_data_nonaggr.nii.gz
bold_file: /gpfs/group/sjw42/default/ASH/DVAL/work/fmriprep_wf/single_subject_102_wf/func_preproc_ses_01_task_cardguess_run_06_wf/bold_std_trans_wf/_std_target_MNI152NLin6Asym.res2/merge/vol0000_xform-00000_merged.nii.gz
function_str: def _add_volumes(bold_file, bold_cut_file, skip_vols): """Prepend skip_vols from bold_file onto bold_cut_file.""" import nibabel as nb import numpy as np from nipype.utils.filemanip import fname_presuffix if skip_vols == 0: return bold_cut_file bold_img = nb.load(bold_file) bold_cut_img = nb.load(bold_cut_file) bold_data = np.concatenate((bold_img.dataobj[..., :skip_vols], bold_cut_img.dataobj), axis=3) out = fname_presuffix(bold_cut_file, suffix='_addnonsteady') bold_img.__class__(bold_data, bold_img.affine, bold_img.header).to_filename(out) return out
skip_vols: 4

Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py”, line 67, in run_node
result[“result”] = node.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/nipype/interfaces/utility/wrappers.py”, line 142, in _run_interface
out = function_handle(**args)
File “”, line 14, in _add_volumes
File “/usr/local/miniconda/lib/python3.7/site-packages/nibabel/arrayproxy.py”, line 391, in array
arr = self._get_scaled(dtype=dtype, slicer=())
File “/usr/local/miniconda/lib/python3.7/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.7/site-packages/nibabel/arrayproxy.py”, line 337, in _get_unscaled
mmap=self._mmap)
File “/usr/local/miniconda/lib/python3.7/site-packages/nibabel/volumeutils.py”, line 534, in array_from_file
getattr(infile, ‘name’, ‘object’)))
OSError: Expected 577682560 bytes, got 62208814 bytes from object

  • could the file be damaged?

Hello,

Have you tried either specifying a new working directory or upgrading to the most recent version of fMRIPrep?

Best,
Steven

Thanks very much for the suggestions, Steven. Upgrading to the latest version seems to have addressed the issue, although I’m now getting a different error (which I’ll post in a new topic). Thanks again.