MQTT-For-Twisted-Python icon indicating copy to clipboard operation
MQTT-For-Twisted-Python copied to clipboard

builtins.IndexError: bytearray index out of range

Open FRANZEE opened this issue 8 years ago • 0 comments

`Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/twisted/python/log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "/usr/local/lib/python3.6/site-packages/twisted/python/log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "/usr/local/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/local/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw) --- --- File "/usr/local/lib/python3.6/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite why = getattr(selectable, method)() File "/usr/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 208, in doRead return self._dataReceived(data) File "/usr/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 214, in _dataReceived rval = self.protocol.dataReceived(data) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 16, in dataReceived self._accumulatePacket(data) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 47, in _accumulatePacket self._processPacket(chunk) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 77, in _processPacket packetHandler(packet, qos, dup, retain) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 108, in _event_connect willTopic = self._decodeString(packet) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 500, in _decodeString length = 256 * encodedString[0] + encodedString[1] builtins.IndexError: bytearray index out of range

Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/twisted/python/log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "/usr/local/lib/python3.6/site-packages/twisted/python/log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "/usr/local/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/local/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw) --- --- File "/usr/local/lib/python3.6/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite why = getattr(selectable, method)() File "/usr/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 208, in doRead return self._dataReceived(data) File "/usr/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 214, in _dataReceived rval = self.protocol.dataReceived(data) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 16, in dataReceived self._accumulatePacket(data) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 47, in _accumulatePacket self._processPacket(chunk) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 77, in _processPacket packetHandler(packet, qos, dup, retain) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 108, in _event_connect willTopic = self._decodeString(packet) File "/Users/ash/PycharmProjects/mqtt_test_01/MQTT/MQTT.py", line 500, in _decodeString length = 256 * encodedString[0] + encodedString[1] builtins.IndexError: bytearray index out of range

`

FRANZEE avatar Jul 28 '17 07:07 FRANZEE