That is true, but when I change that the same error occures.
The output of the function I'm running should be:
out_file (a pathlike object or string representing an existing file) – Output file.
And the full error states:
traits.trait_errors.TraitError: The 'out_file' trait of an AFNICommandOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/Users/erichoekstra/PycharmProjects/brainnetworks_eric_linda/structural_flirt+tlrc.HEAD' <class 'str'> was specified.
So it seems like he's trying to open the out_file (structural_flirt+tlrc.HEAD) but it doesn't exist. So it's somehow now made.