Skip to content
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

Error handling request - JSONDecodeError #10

Open
iMicknl opened this issue Oct 2, 2024 · 0 comments
Open

Error handling request - JSONDecodeError #10

iMicknl opened this issue Oct 2, 2024 · 0 comments

Comments

@iMicknl
Copy link
Contributor

iMicknl commented Oct 2, 2024

I did face a JSONDecodeError sometimes, but I haven't been able to debug this yet. It occurs at random times and I couldn't do a solid repro.

Error handling request
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/aisearch-openai-rag-audio/app/backend/rtmt.py", line 210, in _websocket_handler
    await self._forward_messages(ws)
  File "/workspaces/aisearch-openai-rag-audio/app/backend/rtmt.py", line 202, in _forward_messages
    await asyncio.gather(from_client_to_server(), from_server_to_client())
  File "/workspaces/aisearch-openai-rag-audio/app/backend/rtmt.py", line 195, in from_server_to_client
    new_msg = await self._process_message_to_client(msg, ws, target_ws)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/aisearch-openai-rag-audio/app/backend/rtmt.py", line 114, in _process_message_to_client
    result = await tool.target(json.loads(args))
                               ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant