• depthai_sdk/examples/trigger_action/person_record.py example throws Key Error

While testing the Trigger Action example depthai_sdk/examples/trigger_action/person_record.py, I get a key error thrown from video_recorder.py as follows:

Traceback (most recent call last): File "C:\dev\depthAI-python\.venv\Lib\site-packages\depthai_sdk\oak_outputs\xout\xout_base.py", line 102, in check_queue self.callback(packet) File "C:\dev\depthAI-python\.venv\Lib\site-packages\depthai_sdk\trigger_action\trigger_action.py", line 64, in new_packet_action self.action.on_new_packets(synced) File "C:\dev\depthAI-python\.venv\Lib\site-packages\depthai_sdk\trigger_action\actions\record_action.py", line 124, in on_new_packets self.recorder.add_to_buffers(f'before_t_{wbt_id}', frames) # does for every stream ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\dev\depthAI-python\.venv\Lib\site-packages\depthai_sdk\recorders\video_recorder.py", line 84, in add_to_buffers writer.add_to_buffer(buf_name, frames[name]) ~~~~~~^^^^^^ KeyError: 'color'

The variable frames was {'0_video': <depthai.ImgFrame object at 0x0000018738229F30>, '2_disparity': <depthai.ImgFrame object at 0x000001873822A0B0>}

and the variable nameswas color

which explains the error as colordoes not match the keys in frames

After further investigation it seems that the issue was in video_recorder.py line 43. xout_name was being set to xout.name instead of xout.frames.name.