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

builtins.IndexError: bytearray index out of range #10

Open
FRANZEE opened this issue Jul 28, 2017 · 0 comments
Open

builtins.IndexError: bytearray index out of range #10

FRANZEE opened this issue Jul 28, 2017 · 0 comments

Comments

@FRANZEE
Copy link

FRANZEE commented Jul 28, 2017

`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

`

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