Problem using pydeface in dcm2bids config file

Hi,
I am using dcm2bids (version 3.0.1) converter to convert MRI T1 series data into BIDS format. In the config file, I put the following command to deface the scan:

"post_op": [{"cmd" : "pydeface --outfile dstFile srcFile",
"datatype": "anat",
"suffix": ["T1w"]}],

But I am getting the following exception:

raise TraitError(
traits.trait_errors.TraitError: The 'reference' trait of a FLIRTInputSpec instance must be a pathlike object or string representing an existing file, but a value of 'srcFile' <class 'str'> was specified.

The dcm2bids command I am running for the conversion is:

dcm2bids -d /dcm/input/path -p S001 -c config.json -o /output/path/

I would appreciate it if you could help me to solve this problem. Thanks in advance!

Hi @Rubaida001 and welcome to neurostars!

Referring to the documentation here (Use advanced commands - dcm2bids documentation), please use specifically the terms src_file and dst_file.

Best,
Steven