Skip to content

Commit

Permalink
fix (#1178)
Browse files Browse the repository at this point in the history
Co-authored-by: Maxime Mulder <[email protected]>
  • Loading branch information
maximemulder and maximemuldermcgill authored Sep 5, 2024
1 parent 8ad147f commit 79520d7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions python/lib/bidsreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 79520d7

Please sign in to comment.