From 9e4202a46e307e15ef333e9acc7c9cce60fad533 Mon Sep 17 00:00:00 2001 From: Maxime Mulder Date: Wed, 4 Sep 2024 11:40:30 -0400 Subject: [PATCH] fix --- python/lib/bidsreader.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/python/lib/bidsreader.py b/python/lib/bidsreader.py index 9e4c2e3fe..8ccedb3ec 100755 --- a/python/lib/bidsreader.py +++ b/python/lib/bidsreader.py @@ -7,14 +7,7 @@ import lib.exitcode import lib.utilities as utilities -try: - from bids import BIDSLayout -except ImportError: - try: - from bids.grabbids import BIDSLayout - except ImportError: - print("Could not find bids.layout or bids.grabbids") - exit(lib.exitcode.INVALID_IMPORT) +from bids import BIDSLayout # import bids # BIDSLayoutIndexer is required for PyBIDS >= 0.12.1 @@ -177,7 +170,7 @@ def candidates_list_validation(self, participants_info): for row in participants_info: # remove the "sub-" in front of the subject ID if present row['participant_id'] = row['participant_id'].replace('sub-', '') - if not row['participant_id'] in subjects: + if row['participant_id'] not in subjects: print(mismatch_message) print(row['participant_id'] + 'is missing from the BIDS Layout') print('List of subjects parsed by the BIDS layout: ' + ', '.join(subjects))