diff --git a/frigate/events/maintainer.py b/frigate/events/maintainer.py index 10cdb6b43..eca109c3e 100644 --- a/frigate/events/maintainer.py +++ b/frigate/events/maintainer.py @@ -163,27 +163,22 @@ class EventProcessor(threading.Thread): ) ) - try: - attributes = [ - ( - None - if event_data["snapshot"] is None - else { - "box": to_relative_box( - width, - height, - a["box"], - ), - "label": a["label"], - "score": a["score"], - } - ) + attributes = ( + None + if event_data["snapshot"] is None + else [ + { + "box": to_relative_box( + width, + height, + a["box"], + ), + "label": a["label"], + "score": a["score"], + } for a in event_data["snapshot"]["attributes"] ] - except TypeError: - logger.warning( - f"Failed to parse attributes of event data, event data is {event_data}" - ) + ) # keep these from being set back to false because the event # may have started while recordings and snapshots were enabled