[docs]classThisShouldBeA500ErrorButItsNot(Exception):"""Raised when a detail page request returns a ``200 - OK`` response, but with error information in the HTML content Yes, that really happens """def__str__(self):return"Yes, they really do that. Isn't it lovely?"
[docs]classIncompleteItemError(Exception):"""Raised in :meth:`.model.DetailPageResult.from_html` if a detail page is in an incomplete state This can be the case if the agenda status is not public or if no meeting time has been set. """
[docs]classHiddenItemError(IncompleteItemError):"""Raised if a detail page is ``"Not Viewable by the Public"`` """
[docs]classNoMeetingTimeError(IncompleteItemError):"""Raised if no time was set for the meeting .. note:: This exception is not raised if the item is older than a set amount of time (see :attr:`.rss_parser.FeedItem.is_in_past`) """
[docs]classRSSParseError(Exception):"""Exception raised during parsing """clip_id:CLIP_ID"""The clip id associated with the error"""error_type:ClassVar[RSSParseErrorType]='unknown'"""String indicator of the type of error"""def__init__(self,clip_id:CLIP_ID,msg:str)->None:super().__init__()self.clip_id=clip_idself.msg=msgdef__str__(self)->str:returnf'{self.msg} (clip_id={self.clip_id})'
[docs]classCategoryError(RSSParseError):"""Exception raised when matching :attr:`.rss_parser.FeedItem.category` to a clip location """error_type='category'
[docs]classDatetimeError(RSSParseError):"""Exception raised when matching :attr:`.rss_parser.FeedItem.meeting_date` to a clip datetime """error_type='datetime'
[docs]classLegistarThinksRSSCanPaginateError(Exception):"""Exception raised when an RSS feed contains exactly 100 items This *could* mean there are exactly 100 items available, but Legistar's feed generator limits the results for **any** RSS feed to 100 items **even if there are more available**! As a precaution, this is treated as an error so the feeds can be divided up as described in :class:`.rss_parser.Feed`. """def__str__(self)->str:args=self.argsarg_str=''ifnotlen(args)elsef' {args!r}'msg='Feed item count is exactly 100. This may be missing items because Legistar thinks they can paginate RSS feeds!!!'returnf'{msg}{arg_str}'