agents
agents copied to clipboard
Using @job.room.on("data_received") callback throws errors when a server sent data event.
Hi all,
Using @job.room.on("data_received") callback throws errors when a server sent data event (non-participant).
Traceback (most recent call last):
File "/Users/icaro/Dev/InterScribe/backend/agents/tts-openai/venv/lib/python3.12/site-packages/livekit/rtc/room.py", line 247, in _listen_task
self._on_room_event(event.room_event)
File "/Users/icaro/Dev/InterScribe/backend/agents/tts-openai/venv/lib/python3.12/site-packages/livekit/rtc/room.py", line 402, in _on_room_event
rparticipant = self._retrieve_remote_participant(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/icaro/Dev/InterScribe/backend/agents/tts-openai/venv/lib/python3.12/site-packages/livekit/rtc/room.py", line 455, in _retrieve_remote_participant
participant = self.participants[sid]
~~~~~~~~~~~~~~~~~^^^^^
KeyError: ''
{"job_id": "AJ_EgYQRzdiNgiR", "pid": 93368}
2024-07-01 14:40:30,361 - ERROR root - error running user callback for data_packet_received: room_handle: 3
data_packet_received {
kind: KIND_RELIABLE
user {
Hey @vanics, this is going to be fixed by https://github.com/livekit/python-sdks/pull/215 We will release a new version with this fix soon
Amazing. You folks are doing great. Thank you, @theomonnom !