From 0c91f1dfcc32ff77fcbe1e13a23eb4a79bcc7110 Mon Sep 17 00:00:00 2001 From: leadnaut Date: Fri, 13 Sep 2024 10:02:51 +1000 Subject: [PATCH] fix tries counter --- client/models/pose_detection/frame_capturer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/client/models/pose_detection/frame_capturer.py b/client/models/pose_detection/frame_capturer.py index f2b64d3..f32fd35 100644 --- a/client/models/pose_detection/frame_capturer.py +++ b/client/models/pose_detection/frame_capturer.py @@ -46,5 +46,6 @@ def get_frame(self) -> tuple[np.ndarray, int]: if tries > 5: raise FileNotFoundError('No snapshot found') time.sleep(0.05) else: + tries = 0 finfo = os.stat('/tmp/snapshot.jpg') return (array, finfo.st_mtime) \ No newline at end of file