From 470e3dfbc376f7f83e4c8d31ce8d34e95804ec11 Mon Sep 17 00:00:00 2001 From: Sven van Schie <502539@student.fontys.nl> Date: Thu, 9 Jan 2025 14:18:47 +0100 Subject: [PATCH] Empty array bug fix --- research/scripts/mediapipe/multi_person.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/scripts/mediapipe/multi_person.py b/research/scripts/mediapipe/multi_person.py index ba9a58f..40079df 100644 --- a/research/scripts/mediapipe/multi_person.py +++ b/research/scripts/mediapipe/multi_person.py @@ -287,7 +287,7 @@ def detect_pose_landmarks(self): if not self.is_recording and len(self.recording) > 0: self.recorded_frames.append(self.recording) self.recording = [] - if self.is_replaying: + if self.is_replaying and len(self.recorded_frames) > 0: random_recording = randrange(len(self.recorded_frames)) for replay_frame in self.recorded_frames[random_recording]: cw.pixels[:] = replay_frame