Skip to content

Commit

Permalink
[FIX] Fix _create_merge_file_from_bids (#1019)
Browse files Browse the repository at this point in the history
Co-authored-by: NicolasGensollen <[email protected]>
  • Loading branch information
NicolasGensollen and NicolasGensollen authored Nov 17, 2023
1 parent dba6f9b commit 38752d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clinica/iotools/utils/data_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ def _create_merge_file_from_bids(
new_col_name = f"{modality}_{col}"
scans_dict.update({new_col_name: value})
json_path = (
bids_dir / subject / session / f"{filename}.json"
bids_dir
/ subject
/ session
/ f"{filepath.split('.')[0]}.json"
)
if json_path.exists():
with open(json_path, "r") as f:
Expand Down

0 comments on commit 38752d3

Please sign in to comment.