From 19115fb82834252edf01b105922daddfc73d7ec4 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 16 Jul 2021 07:28:30 -0500 Subject: [PATCH] handle exception when missing frame --- frigate/output.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/frigate/output.py b/frigate/output.py index 9b265c530..650aab226 100644 --- a/frigate/output.py +++ b/frigate/output.py @@ -159,9 +159,16 @@ class BirdsEyeFrameManager: frame = None channel_dims = None else: - frame = self.frame_manager.get( - f"{camera}{frame_time}", self.config.cameras[camera].frame_shape_yuv - ) + try: + frame = self.frame_manager.get( + f"{camera}{frame_time}", self.config.cameras[camera].frame_shape_yuv + ) + except FileNotFoundError: + # TODO: better frame management would prevent this edge case + logger.warning( + f"Unable to copy frame {camera}{frame_time} to birdseye." + ) + return channel_dims = self.cameras[camera]["channel_dims"] copy_yuv_to_position(