Skip to content

Commit

Permalink
pass on key error, boarding group B now
Browse files Browse the repository at this point in the history
  • Loading branch information
Shotgunosine committed May 6, 2022
1 parent 182cd35 commit c7c928e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bids/modeling/statsmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,15 @@ def __init__(self, level, name, transformations=None, model=None,
self.group_by = group_by

# Check for intercept only run level model and throw an error
if (self.level == 'run') and (self.model['X'] == [1]):
raise NotImplementedError("Run level intercept only models are not currently supported."
"If this is a feature you need, please leave a comment at"
"https://github.com/bids-standard/pybids/issues/852.")
try:
if (self.level == 'run') and (self.model['X'] == [1]):
raise NotImplementedError("Run level intercept only models are not currently supported."
"If this is a feature you need, please leave a comment at"
"https://github.com/bids-standard/pybids/issues/852.")
except KeyError:
# We talked about X being required, I don't know if we want to throw an error over that requirement here
# though.
pass

def __repr__(self):
return f"<{self.__class__.__name__}[{self.level}] {self.name}>"
Expand Down

0 comments on commit c7c928e

Please sign in to comment.