livekit / python-sdks

LiveKit real-time and server SDKs for Python

Home Page:https://docs.livekit.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

server send data has no participant

DeoLeung opened this issue · comments

if i do

      req = SendDataRequest(room='abc',
                            data=json.dumps({
                                'event': 'a',
                                'data':'b'
                            }))
        await room.send_data(req)

rtc room will fail with

/livekit/rtc/room.py", line 455, in _retrieve_remote_participant
     participant = self.participants[sid]
                 ~~~~~~~~~~~~~~~~~^^^^^
 KeyError: ''

currently inherited Room to workaround

self.participants.get(sid)

just new to livekit and not sure if we need a participant for server sent data