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

Log full of error - can't decode byte 0x89 in position 0: invalid start byte #1

Open
StefanoGiu opened this issue Dec 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@StefanoGiu
Copy link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcb in position 1: invalid continuation byte
2023-12-07 13:57:53.660 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _ProactorDatagramTransport._loop_reading(<_OverlappedF...135', 62926))>)
Traceback (most recent call last):
File ".homeassistant\custom_components\localtuya\discovery.py", line 65, in datagram_received
data = decrypt_udp(data)
^^^^^^^^^^^^^^^^^
File ".homeassistant\custom_components\localtuya\discovery.py", line 30, in decrypt_udp
return _unpad(decryptor.update(message) + decryptor.finalize()).decode()
^^^^^^^^^^^^^^^^^^^^
File "Python311\Lib\site-packages\cryptography\hazmat\primitives\ciphers\base.py", line 186, in finalize
data = self._ctx.finalize()
^^^^^^^^^^^^^^^^^^^^
File "Python311\Lib\site-packages\cryptography\hazmat\backends\openssl\ciphers.py", line 222, in finalize
raise ValueError(
ValueError: The length of the provided data is not a multiple of the block length.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Python311\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "Python311\Lib\asyncio\proactor_events.py", line 607, in _loop_reading
self._protocol.datagram_received(data, addr)
File ".homeassistant\custom_components\localtuya\discovery.py", line 67, in datagram_received
data = data.decode()
^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 1: invalid start byte
2023-12-07 13:57:58.663 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _ProactorDatagramTransport._loop_reading(<_OverlappedF...135', 62926))>)
Traceback (most recent call last):
File ".homeassistant\custom_components\localtuya\discovery.py", line 65, in datagram_received
data = decrypt_udp(data)
^^^^^^^^^^^^^^^^^
File ".homeassistant\custom_components\localtuya\discovery.py", line 30, in decrypt_udp
return _unpad(decryptor.update(message) + decryptor.finalize()).decode()
^^^^^^^^^^^^^^^^^^^^
File "Python311\Lib\site-packages\cryptography\hazmat\primitives\ciphers\base.py", line 186, in finalize
data = self._ctx.finalize()
^^^^^^^^^^^^^^^^^^^^
File "Python311\Lib\site-packages\cryptography\hazmat\backends\openssl\ciphers.py", line 222, in finalize
raise ValueError(
ValueError: The length of the provided data is not a multiple of the block length.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Python311\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "Python311\Lib\asyncio\proactor_events.py", line 607, in _loop_reading
self._protocol.datagram_received(data, addr)
File ".homeassistant\custom_components\localtuya\discovery.py", line 67, in datagram_received
data = data.decode()
^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

@StefanoGiu StefanoGiu added the bug Something isn't working label Dec 7, 2023
@StefanoGiu
Copy link
Author

Running on latest component version and HA 2023.11.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant