Fix snapshot access

This commit is contained in:
Nicolas Mowen 2024-09-26 18:53:57 -06:00
parent a65aaab849
commit c77873d960

View File

@ -163,12 +163,11 @@ class EventProcessor(threading.Thread):
)
)
try:
attributes = [
(
attributes = (
None
if event_data["snapshot"] is None
else {
else [
{
"box": to_relative_box(
width,
height,
@ -177,12 +176,8 @@ class EventProcessor(threading.Thread):
"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