Skip to content

Commit 6ed1e21

Browse files
committed
fix json loading
1 parent ec67041 commit 6ed1e21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fmriprep/cli/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def get_parser():
8282
# Re-enable when option is actually implemented
8383
# g_bids.add_argument('-r', '--run-id', action='store', default='single_run',
8484
# help='select a specific run to be processed')
85-
g_bids.add_argument('bids_filters', action='store', type=Path,
85+
g_bids.add_argument('--bids_filters', action='store', type=Path,
8686
help='the path to a JSON file describing custom BIDS input filter')
8787
g_bids.add_argument('-t', '--task-id', action='store',
8888
help='select a specific task to be processed')
@@ -527,7 +527,7 @@ def build_workflow(opts, retval):
527527
output_dir = opts.output_dir.resolve()
528528
work_dir = opts.work_dir.resolve()
529529
bids_filters_file = opts.bids_filters.resolve()
530-
bids_filters = json.load(bids_filters_file) if bids_filters_file else Undefined
530+
bids_filters = json.load(open(bids_filters_file)) if bids_filters_file else Undefined
531531

532532
retval['return_code'] = 1
533533
retval['workflow'] = None

0 commit comments

Comments
 (0)