Skip to content

JSONDecodeError related to Invalid Namespace #9

@samayala22

Description

@samayala22

Hey, having a hard time understanding a way to fix this "Invalid Namespace" response parsing issue.

The extra debug info was obtained using sio = socketio.AsyncClient(logger=True, engineio_logger=True) in the scorebot file.

Signal handler is unsupported
Attempting WebSocket connection to wss://scorebot-lb.hltv.org/socket.io/?transport=websocket&EIO=4
WebSocket connection accepted with {'sid': 'a60e8fb7-0da1-4394-9af2-d52894bd8887', 'upgrades': ['websocket'], 'pingInterval': 25000, 'pingTimeout': 60000}
Engine.IO connection established
Sending packet MESSAGE data 0{}
Received packet MESSAGE data 0
Namespace / is connected
Emitting event "readyForMatch" [/]
Sending packet MESSAGE data 2["readyForMatch","{\"listId\": 2354815}"]
connected to match 2354815!
running in background
Received packet MESSAGE data 4{},"Invalid namespace"
Task exception was never retrieved
future: <Task finished name='Task-14' coro=<AsyncClient._handle_eio_message() done, defined at C:\Python\Python39\lib\site-packages\socketio\asyncio_client.py:505> exception=JSONDecodeError('Extra data: line 1 column 3 (char 2)')>
Traceback (most recent call last):
  File "C:\Python\Python39\lib\site-packages\socketio\asyncio_client.py", line 516, in _handle_eio_message
    pkt = self.packet_class(encoded_packet=data)
  File "C:\Python\Python39\lib\site-packages\socketio\packet.py", line 43, in __init__
    self.attachment_count = self.decode(encoded_packet) or 0
  File "C:\Python\Python39\lib\site-packages\socketio\packet.py", line 128, in decode
    self.data = self.json.loads(ep)
  File "C:\Python\Python39\lib\site-packages\engineio\json.py", line 16, in loads
    return original_loads(*args, **kwargs)
  File "C:\Python\Python39\lib\json\__init__.py", line 359, in loads
    return cls(**kw).decode(s)
  File "C:\Python\Python39\lib\json\decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 3 (char 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions