diff --git a/dcm2bids/dcm2bids_gen.py b/dcm2bids/dcm2bids_gen.py index 7842c07d..ae5e4065 100644 --- a/dcm2bids/dcm2bids_gen.py +++ b/dcm2bids/dcm2bids_gen.py @@ -175,14 +175,14 @@ def move(self, acq, idList, post_op): # before and after post_op if 'custom_entities' in curr_post_op: acq.setExtraDstFile(curr_post_op["custom_entities"]) - + extraDstFile = self.bids_dir / acq.extraDstFile # Copy json file with this new set of custom entities. shutil.copy( str(srcFile).replace("".join(ext), ".json"), - f"{str(acq.extraDstFile)}.json", + f"{str(extraDstFile)}.json", ) cmd = cmd.replace('dst_file', - str(acq.extraDstFile) + ''.join(ext)) + str(extraDstFile) + ''.join(ext)) else: cmd = cmd.replace('dst_file', str(dstFile))