nipype icon indicating copy to clipboard operation
nipype copied to clipboard

Getting TraitError for `ref_file` trait for RegAladin command

Open xd3262nd opened this issue 4 years ago • 0 comments

Summary

Getting a TraitError for input file even the file exists. I have tried the same command and same file using the Niftyreg and it works but not on nipype

Actual behavior

Here is the code

from nipype.interfaces import niftyreg

reg_aladin = niftyreg.RegAladin()
reg_aladin.inputs.ref_file = ref_img
reg_aladin.inputs.flo_file = flo_img
reg_aladin.inputs.res_file = res_affine_img
reg_aladin.inputs.aff_file = affine_matrix
reg_aladin.run()

Received this error when doing the run() The 'ref_file' trait of a RegAladinInputSpec instance must be a pathlike object or string representing an existing file, but a value of '/usrname/d1/input/nifti_files/screen_CT.nii.gz' <class 'str'> was specified.

Expected behavior

Expected to be running properly and generate a few output files

xd3262nd avatar Mar 30 '21 14:03 xd3262nd