Hi everyone; I am facing this issue persistently ...
# telephony
b
Hi everyone; I am facing this issue persistently from past 3 days. I have look and create multiple API and check them but issue is not going away. The main issue is that I am not able to connect with the livekit through code. even though my agent is working locally using command like uv run agent.py console but when I switch to uv run agent.py dev the issue occur I don't what to do. i have look up all the issues of livekit in github but this is not addressed. I am 100% sure that the issue is not with the API I grab from the livekit dashboard.. 'Traceback (most recent call last): File "/home/naveed-ur-rehman/Desktop/nodeable-ai-agent/.venv/lib/python3.12/site-pack ages/livekit/agents/worker.py", line 974, in _connection_task ws = await self._http_session.ws_connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/naveed-ur-rehman/Desktop/nodeable-ai-agent/.venv/lib/python3.12/site-pack ages/aiohttp/client.py", line 1093, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 401, message='Invalid response status', url='wss://nodeableai-ydb6utih.livekit.cloud/agent''
l
It sounds like something quite fundamental with the setup of your LiveKit API key or secret, especially since
uv run agent.py console
works but
uv run agent.py dev
does not. Some things to check: • Check the 3 values of LIVEKIT_xxx in your
.env.local
• Are you able to run either of the starter projects at https://docs.livekit.io/agents/start/voice-ai-quickstart/ • Try creating a new project with new API keys