diff --git a/scrapers/ma/votes.py b/scrapers/ma/votes.py index 05dec796c5..baf0995ea0 100644 --- a/scrapers/ma/votes.py +++ b/scrapers/ma/votes.py @@ -204,7 +204,14 @@ def parse_match(self, match, index): """ raw_motion_text = match.group("rawmotion") - motion_text = self.precise_motion_re.search(raw_motion_text).group(1) + motion_text = self.precise_motion_re.search(raw_motion_text) + if motion_text: + motion_text = motion_text.group(1) + else: + self.logger.warn( + f"No valid motion text found preceding vote lines in {self.source}" + ) + return single_line_motion = motion_text.replace("\n", " ") normalized_motion = single_line_motion.capitalize()