TraitError ("seg" output) when using epi_reg via nipype

I’m running a workflow that performs distortion correction and registration via the EpiReg interface. Since the method is based on leveraging white matter boundaries, it produces a white matter segmentation by default (by running FSL FAST under the hood, I think). I’d like to use the white matter segmentation produced by FreeSurfer instead via the --wmseg optional input.

I get an error message saying the output “seg” of the interface does not exist:

When I look into the working directory, the expected output niftis are there. It’s just that the workflow crashes right afterwards. Also, when I copy the command from the command.txt into my terminal, it also works just fine:

Lastly, when I remove the “wmseg” input and let epi_reg perform its own white matter segmentation, it works fine as well.

Here’s also a screenshot of the report.rst and the software versions:


Nipype version: 1.5.1
FSL version: 6.0.3
MacOS Catalina 10.15.7

Any help as to what might go wrong here would be greatly appreciated!
Thanks
Oliver