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

client: python crash when receiving malformed packet #2

Open
mik3y opened this issue Jul 3, 2012 · 0 comments
Open

client: python crash when receiving malformed packet #2

mik3y opened this issue Jul 3, 2012 · 0 comments

Comments

@mik3y
Copy link
Member

mik3y commented Jul 3, 2012

bubar reported this in the forum:

2012-06-30 17:16:11,872 INFO (device-io) Found a Kegboard! Firmware version 11
2012-06-30 17:16:11,879 INFO (kegboard-manager) RX: <HelloMessage: firmware_version=11>
2012-06-30 17:16:11,994 INFO (kegboard-manager) RX: <MeterStatusMessage: meter_name=fl?w0 meter_reading=10>
Exception in thread kegboard-manager:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/kegbot-0.8.5-py2.7.egg/EGG-INFO/scripts/kegboard_daemon.py", line 147, in run
self._HandleDeviceMessage(device_name, device_message)
File "/usr/local/lib/python2.7/dist-packages/kegbot-0.8.5-py2.7.egg/EGG-INFO/scripts/kegboard_daemon.py", line 155, in _HandleDeviceMessage
self._client.SendMeterUpdate(meter_name, curr_val)
File "/usr/local/lib/python2.7/dist-packages/kegbot-0.8.5-py2.7.egg/pykeg/client/net/kegnet.py", line 210, in SendMeterUpdate
return self.SendMessage(message)
File "/usr/local/lib/python2.7/dist-packages/kegbot-0.8.5-py2.7.egg/pykeg/client/net/kegnet.py", line 128, in SendMessage
str_message = msg.ToJson(indent=None)
File "/usr/local/lib/python2.7/dist-packages/kegbot-0.8.5-py2.7.egg/pykeg/client/kbevent.py", line 56, in ToJson
return kbjson.dumps(self.ToDict(), indent=indent)
File "/usr/local/lib/python2.7/dist-packages/kegbot-0.8.5-py2.7.egg/pykeg/core/kbjson.py", line 83, in dumps
return json.dumps(obj, indent=indent, cls=cls)
File "/usr/lib/python2.7/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 201, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.7/json/encoder.py", line 264, in iterencode
return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 11: invalid start 

byte2012-06-30 17:22:00,361 ERROR (device-io) Uncaught exception in thread device-io. Stack trace:
[...]
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