Charestlab/pyslicetime

nibabel saving problem

Closed this issue · 1 comments

Node: fmriprep_wf.single_subject_1_wf.func_preproc_ses_1_task_fmriwmrsa_run_02_wf.bold_stc_wf.slice_timing_correction
Working directory: /work/fmriprep_wf/single_subject_1_wf/func_preproc_ses_1_task_fmriwmrsa_run_02_wf/bold_stc_wf/slice_timing_correction

Node inputs:

in_file = /work/fmriprep_wf/single_subject_1_wf/func_preproc_ses_1_task_fmriwmrsa_run_02_wf/bold_reference_wf/validate/sub-1_ses-1_task-fmriwmrsa_run-02_bold_valid.nii.gz
out_file =
slicetimes = [0.66, 0.0, 0.44, 0.075, 0.515, 0.1475, 0.5875, 0.295, 0.735, 0.3675, 0.8075, 0.22, 0.66, 0.0, 0.44, 0.075, 0.515, 0.1475, 0.5875, 0.295, 0.735, 0.3675, 0.8075, 0.22, 0.66, 0.0, 0.44, 0.075, 0.515, 0.1475, 0.5875, 0.295, 0.735, 0.3675, 0.8075, 0.22, 0.66, 0.0, 0.44, 0.075, 0.515, 0.1475, 0.5875, 0.295, 0.735, 0.3675, 0.8075, 0.22]
tr_new = 0.5
tr_old = 0.9

Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 472, in run
result = self._run_interface(execute=True)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 563, in _run_interface
return self._run_command(execute)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_command
result = self._interface.run(cwd=outdir)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 375, in run
runtime = self._run_interface(runtime)
File "/usr/local/miniconda/lib/python3.7/site-packages/slicetime/nipype_interface.py", line 44, in _run_interface
tr_new=self.inputs.tr_new,
File "/usr/local/miniconda/lib/python3.7/site-packages/slicetime/main.py", line 71, in run_slicetime
nib.save(corr_img, outpath)
File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/loadsave.py", line 106, in save
froot, ext, trailing = splitext_addext(filename, ('.gz', '.bz2'))
File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/filename_parser.py", line 265, in splitext_addext
if endswith(filename, ext):
File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/filename_parser.py", line 223, in _iendswith
return whole.lower().endswith(end.lower())
AttributeError: '_Undefined' object has no attribute 'lower'

this was due to missing outfile arg