From 946d655cee19a9d0fc09628992d770b3634bfcf8 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 14 Nov 2020 17:30:24 -0600 Subject: [PATCH] check for None value thumbnail_data --- frigate/object_processing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 378010a50..d935be068 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -157,7 +157,7 @@ class TrackedObject(): } def get_jpg_bytes(self): - if self._snapshot_jpg_time == self.thumbnail_data['frame_time']: + if self.thumbnail_data is None or self._snapshot_jpg_time == self.thumbnail_data['frame_time']: return self._snapshot_jpg if not self.thumbnail_data['frame_time'] in self.frame_cache: @@ -326,7 +326,7 @@ class CameraState(): for obj in self.tracked_objects.values(): object_type = obj.obj_data['label'] # if the object's thumbnail is not from the current frame - if obj.thumbnail_data['frame_time'] != self.current_frame_time or obj.false_positive: + if obj.false_positive or obj.thumbnail_data['frame_time'] != self.current_frame_time: continue if object_type in self.best_objects: current_best = self.best_objects[object_type]