Open Dvalin21 opened 1 year ago
Seems like a race condition when fetching a snapshot for the UI.
Nothing to worry about tho. Will make sure to fix it
Im getting this error when i disable the connection entity in home assistant and then load the viseron homepage.
[2023-05-01 12:17:33] [ERROR ] [viseron.components.webserver.api.handlers] - Error in API CameraAPIHandler.get_snapshot: UUID('80c68ae3-4530-4b31-9a8e-02cf883bbfd5')
Traceback (most recent call last):
File "/src/viseron/components/webserver/api/handlers.py", line 264, in route_request
getattr(self, route.get("method"))(*path_args, **path_kwargs)
File "/src/viseron/components/webserver/api/v1/camera.py", line 57, in get_snapshot
ret, jpg = camera.get_snapshot(
File "/src/viseron/domains/camera/__init__.py", line 411, in get_snapshot
decoded_frame = self.shared_frames.get_decoded_frame_rgb(current_frame)
File "/src/viseron/domains/camera/shared_frames.py", line 99, in get_decoded_frame_rgb
return self._color_convert(shared_frame, COLOR_MODEL_RGB)
File "/src/viseron/domains/camera/shared_frames.py", line 89, in _color_convert
decoded_frame = self.get_decoded_frame(shared_frame).copy()
File "/src/viseron/domains/camera/shared_frames.py", line 79, in get_decoded_frame
return self._frames[shared_frame.name]
KeyError: UUID('80c68ae3-4530-4b31-9a8e-02cf883bbfd5')
Not sure what happened, but I'm getting this
[2023-04-22 08:27:25] [ERROR ] [viseron.components.webserver.api.handlers] - Error in API CameraAPIHandler.get_snapshot: UUID('d5258253-14b5-4d68-a9ab-bbcdca98c6fb') Traceback (most recent call last): File "/src/viseron/components/webserver/api/handlers.py", line 264, in route_request getattr(self, route.get("method"))(*path_args, **path_kwargs) File "/src/viseron/components/webserver/api/v1/camera.py", line 57, in get_snapshot ret, jpg = camera.get_snapshot( File "/src/viseron/domains/camera/init.py", line 411, in get_snapshot decoded_frame = self.shared_frames.get_decoded_frame_rgb(current_frame) File "/src/viseron/domains/camera/shared_frames.py", line 99, in get_decoded_frame_rgb return self._color_convert(shared_frame, COLOR_MODEL_RGB) File "/src/viseron/domains/camera/shared_frames.py", line 89, in _color_convert decoded_frame = self.get_decoded_frame(shared_frame).copy() File "/src/viseron/domains/camera/shared_frames.py", line 79, in get_decoded_frame return self._frames[shared_frame.name] KeyError: UUID('d5258253-14b5-4d68-a9ab-bbcdca98c6fb') [2023-04-22 08:27:25] [ERROR ] [tornado.access] - 500 GET /api/v1/camera/camera_2/snapshot?rand=vm9gr&width=507 (10.0.0.47) 18.05ms