-
Notifications
You must be signed in to change notification settings - Fork 64
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
Text/byte stream handling bug, documentation issues #379
base: main
Are you sure you want to change the base?
Conversation
Fix for RuntimeWarning: coroutine 'RoomManager.handle_text_stream' was never awaited This occurs when a message is received from a text stream.
@onorabil thanks for the fix. we've got a couple of CI failures, do you mind taking a look? |
You're welcome! 1/2 failures fixed, the second one appears to be github actions related / branch not in livekit/python-sdks. 2025-03-01T23:26:57.8896834Z ##[group]Run actions/checkout@v3 |
This was done on purpose, the responsibility for asynchronous management for the handler was supposed to live in user land, so having a synchronous callback and using asyncio task handling within the callback. the docs need an update to reflect that. curious to hear @theomonnom take on this |
Fix for RuntimeWarning: coroutine 'RoomManager.handle_text_stream' was never awaited This occurs when a message is received from a text (or byte) stream.
As shown in the documentation here, https://docs.livekit.io/home/client/data/text-streams/ a stream should register a handle like this:
But this results in the error above.
Furthmore, some documentation from the text-streams page above is wrong.
f' ID: {info.id}\n'
should readf' ID: {info.stream_id}\n'
room.registerTextStreamHandler('my-topic', (reader, participantInfo) => {
should readroom.registerTextStreamHandler('my-topic', async (reader, participantInfo) => {