socketIO-client icon indicating copy to clipboard operation
socketIO-client copied to clipboard

unhandled network error

Open iddq opened this issue 7 years ago • 1 comments

Traceback (most recent call last):
  File "history.py", line 66, in <module>
    socketIO.wait(seconds=1)
  File "/usr/local/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 254, in wait
    self._process_packets()
  File "/usr/local/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 279, in _process_packets
    for engineIO_packet in self._transport.recv_packet():
  File "/usr/local/lib/python2.7/dist-packages/socketIO_client/transports.py", line 156, in recv_packet
    packet_text)
  File "/usr/local/lib/python2.7/dist-packages/socketIO_client/parsers.py", line 96, in parse_packet_text
    packet_type = int(get_character(packet_text, 0))
  File "/usr/local/lib/python2.7/dist-packages/socketIO_client/symmetries.py", line 26, in get_character
    return chr(get_byte(x, index))
  File "/usr/local/lib/python2.7/dist-packages/socketIO_client/symmetries.py", line 30, in get_byte
    return six.indexbytes(x, index)
  File "/usr/lib/python2.7/dist-packages/six.py", line 607, in indexbytes
    return ord(buf[i])
IndexError: string index out of range

iddq avatar Nov 11 '16 08:11 iddq

Hmm, I would need more context here if available.

If this happens regularly and other people are getting corrupted packets, then maybe we can catch the IndexError and ignore it to drop corrupted packets.

invisibleroads avatar Dec 11 '16 03:12 invisibleroads