Skip to content

Commit

Permalink
Modify BIDSImagingSequence to catch error if a parameter class is not…
Browse files Browse the repository at this point in the history
… found
  • Loading branch information
sinhaharsh committed Feb 9, 2024
1 parent 77284df commit 7b0aa99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion protocol/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,13 @@ def parse(self, bidsfile, params=None):
if value is not None:
# If even one value is not None, we will set the non_empty_flag
self.non_empty_flag = True
self.add_parameter(pname_alter, value)

try:
self.add_parameter(pname_alter, value)
except ImportError as err:
# if the parameter class does not exist, log the error
# and continue to the next parameter
logger.error(err)

def is_valid(self):
"""
Expand Down

0 comments on commit 7b0aa99

Please sign in to comment.