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

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xea #729

Open
dev4i opened this issue Nov 24, 2022 · 0 comments
Open

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xea #729

dev4i opened this issue Nov 24, 2022 · 0 comments

Comments

@dev4i
Copy link

dev4i commented Nov 24, 2022

Getting this error occurring sometimes with the S3 Hub. It seems to resolve on it's own sometimes, but can also be resolved by rebooting the hub.

Error stack trace shows hub.py line 42 - return self._decode(response)
and also hub.py line 82 - state = json.loads(payload[0x0C : 0x0C + js_len])

I couldn't figure out what was causing it, but there seems to be some of the JSON missing when i was printing 'payload' on line 80. See output below:

Payload:
b'\xa5\xa5ZZ/\xcd\x03\x0b\x1f\x00\x00\x00\xea\x0e\xac\x91\x1d\x05\xf4K\xddV\x8c\x8d+\xda4,"lb_online1":0}\x00\x00\x00\x00\x00'

js_len:
31

A working example was as below:

Payload:
b'\xa5\xa5ZZg\xd7\x03\x0bI\x00\x00\x00{"pwr1":0,"pwr2":0,"pwr3":0,"plugmode":0,"hb_timeout":180,"lb_online1":1}\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

js_len:
73

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