Description
Summary
I'm using MCFLIRT to correct motion of my data. Everything works, I get all the outputs expected, but in the end I get this error:
TraitError: The trait 'mean_img' of a MCFLIRTOutputSpec instance is an existing file name, but the path '/Users/Abel-Gonzalez/msS06N-4D.nii.gz_mean_reg.nii.gz' does not exist.
Or sometimes:
TraitError: The trait 'out_file' of a MCFLIRTOutputSpec instance ...
If I don't specify out_file in the code, it saves the outputs in my home directory.
Script/Workflow details
import nipype.interfaces.fsl as fsl
motionCorr = fsl.MCFLIRT(in_file="/Users/Abel-Gonzalez/Desktop/mcflirt/C06/sS06N-4D.nii.gz", mean_vol=True, save_plots=True, save_rms=True, save_mats=True, out_file="/Users/Abel-Gonzalez/Desktop/mcflirt/C06/msS06N-4D.nii.gz")
motionCorr.run()
Error
TraitError Traceback (most recent call last)
in ()
----> 1 mcflt1.run()
/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py in run(self, cwd, ignore_exception, **inputs)
521 runtime = self._run_interface(runtime)
522 runtime = self._post_run_hook(runtime)
--> 523 outputs = self.aggregate_outputs(runtime)
524 except Exception as e:
525 import traceback
/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py in aggregate_outputs(self, runtime, needed_outputs)
618 "'%s'." % (val, self.class.name, key))
619 raise FileNotFoundError(msg)
--> 620 raise error
621
622 return outputs
/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py in aggregate_outputs(self, runtime, needed_outputs)
611 self.class.name))
612 try:
--> 613 setattr(outputs, key, val)
614 except TraitError as error:
615 if getattr(error, 'info',
/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/traits_extension.py in validate(self, object, name, value)
110 args='The trait '{}' of {} instance is {}, but the path '
111 ' '{}' does not exist.'.format(name, class_of(object),
--> 112 self.info_text, value))
113
114 self.error(object, name, value)
TraitError: The trait 'mean_img' of a MCFLIRTOutputSpec instance is an existing file name, but the path '/Users/Abel-Gonzalez/msS06N-4D.nii.gz_mean_reg.nii.gz' does not exist.
Platform details:
macOS 10.13.6
Execution environment
Choose one
- Container [Tag: ???]
- My python environment inside container [Base Tag: ???]
- My python environment outside container