Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using @job.room.on("data_received") callback throws errors when a server sent data event. #404

Closed
vanics opened this issue Jul 1, 2024 · 2 comments

Comments

@vanics
Copy link
Contributor

vanics commented Jul 1, 2024

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 {
@theomonnom
Copy link
Member

Hey @vanics, this is going to be fixed by livekit/python-sdks#215
We will release a new version with this fix soon

@vanics
Copy link
Contributor Author

vanics commented Jul 9, 2024

Amazing. You folks are doing great.
Thank you, @theomonnom !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants