gilbert189 @gilbert189
connect handler error
Traceback (most recent call last):
  File "/home/runner/test/venv/lib/python3.8/site-packages/engineio/client.py", line 540, in _trigger_event
    return self.handlers[event](*args)
  File "/home/runner/test/venv/lib/python3.8/site-packages/socketio/client.py", line 685, in _handle_eio_connect
    self._send_packet(self.packet_class(
  File "/home/runner/test/venv/lib/python3.8/site-packages/socketio/client.py", line 543, in _send_packet
    encoded_packet = pkt.encode()
  File "/home/runner/test/venv/lib/python3.8/site-packages/socketio/packet.py", line 64, in encode
    encoded_packet += self.json.dumps(data, separators=(',', ':'))
  File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/json/__init__.py", line 234, in dumps
    return cls(
  File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Response is not JSON serializable


help?
Jun 15, 2022, 1:11 PM
3

comments

it is a trace stack I think, what is your code?

Nevermind. It turns out that I actually provide a Response object as the token instead of the actual token string. Whoops!