You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
occasionally I am running into this error when using play_bytes():
Traceback (most recent call last):
File "/home/robin/.local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 480, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/robin/.local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/robin/git/raphson/music-headless/raphson_music_headless/server.py", line 113, in _next
await self.player.next(retry=False)
File "/home/robin/git/raphson/music-headless/raphson_music_headless/player/mpv_player.py", line 80, in next
self.player.play_bytes(download.audio)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/robin/.local/lib/python3.13/site-packages/mpv.py", line 2003, in play_bytes
@self.python_stream(stream_name)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/home/robin/.local/lib/python3.13/site-packages/mpv.py", line 1950, in register
raise KeyError('Python stream name "{}" is already registered'.format(name))
KeyError: 'Python stream name "__python_mpv_play_generator_8787028885788" is already registered'
I saw in the source code that the stream name is generated like this:
hi, thanks for this library, it is very useful.
occasionally I am running into this error when using
play_bytes()
:I saw in the source code that the stream name is generated like this:
I don't know what a frame is really, but apparently it is not unique for every call. I replaced it by this:
and that seemed to work. Is there any reason it doesn't use a randomly generated identifier? Like
uuid.uuid4()
orsecrets.token_urlsafe()
, for exampleThe text was updated successfully, but these errors were encountered: