-
Notifications
You must be signed in to change notification settings - Fork 5
Description
receive error:
💬 [en] Thank you.❌ WebSocket error:
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<publish_audio() done, defined at /Users/danny/nanopalabra.py:102> exception=ConnectionClosedError(Close(code=1008, reason='Session is not valid'), Close(code=1008, reason='Session is not valid'), True)>
Traceback (most recent call last):
File "/Users/danny/nanopalabra.py", line 147, in publish_audio
await ws.send(message)
File "/Users/danny/nanopalabra.py", line 98, in send
await self.ws.send(json.dumps(message))
File "/Users/danny/miniconda3/lib/python3.13/site-packages/websockets/asyncio/connection.py", line 476, in send
async with self.send_context():
~~~~~~~~~~~~~~~~~^^
File "/Users/danny/miniconda3/lib/python3.13/contextlib.py", line 214, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/danny/miniconda3/lib/python3.13/site-packages/websockets/asyncio/connection.py", line 957, in send_context
raise self.protocol.close_exc from original_exc
websockets.exceptions.ConnectionClosedError: received 1008 (policy violation) Session is not valid; then sent 1008 (policy violation) Session is not valid
can't start anymore:
danny@dannydeMacBook-Pro ~ python nanopalabra.py
🚀 Palabra WebSocket Minimal Client
Traceback (most recent call last):
File "/Users/danny/nanopalabra.py", line 273, in
asyncio.run(main())
~~~~~~~~~~~^^^^^^^^
File "/Users/danny/miniconda3/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/Users/danny/miniconda3/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/Users/danny/miniconda3/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/Users/danny/nanopalabra.py", line 239, in main
session = await create_session(
^^^^^^^^^^^^^^^^^^^^^
os.getenv("PALABRA_CLIENT_ID"), os.getenv("PALABRA_CLIENT_SECRET")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/danny/nanopalabra.py", line 36, in create_session
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/Users/danny/miniconda3/lib/python3.13/site-packages/httpx/_models.py", line 829, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '403 Forbidden' for url 'https://api.palabra.ai/session-storage/session'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403