You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error doing job: Exception in callback _SelectorDatagramTransport._read_ready() (None)
Traceback (most recent call last):
File "/config/custom_components/localtuya/discovery.py", line 65, in datagram_received
data = decrypt_udp(data)
^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/discovery.py", line 30, in decrypt_udp
return _unpad(decryptor.update(message) + decryptor.finalize()).decode()
^^^^^^^^^^^^^^^^^^^^
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 "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 1238, in _read_ready
self._protocol.datagram_received(data, addr)
File "/config/custom_components/localtuya/discovery.py", line 67, in datagram_received
data = data.decode()
^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcb in position 0: invalid continuation byte
The text was updated successfully, but these errors were encountered:
I initially suspected my issue on upgrade was related to this, but it turned out the issues was about entities and format. I was able to get going again by 'editing' each entity and submitting. I didn't change any settings, but it seems resubmitting in localtuya config got things moving.
The above said, I did dig into this issue a bit, and had patched locally before reverting my change as my debug logs didn't have this error. If you locally change to use latin-1 (aka 'latin-1', 'iso_8859_1' and '8859') it may get you past the failure and into seeing the content. I can't be sure this works, but you could at least change line 67 and get the data when the exception occurs and maybe see what's going wrong.
Ten błąd pochodzi z niestandardowej integracji.
Rejestrator: homeassistant
Źródło: custom_components/localtuya/discovery.py:67
integracja: LocalTuya integration (dokumentacja, Problemy)
Pierwsze zdarzenie: 14:43:34 (11310 zdarzenia)
Ostatnio zalogowany: 22:37:13
Error doing job: Exception in callback _SelectorDatagramTransport._read_ready() (None)
Traceback (most recent call last):
File "/config/custom_components/localtuya/discovery.py", line 65, in datagram_received
data = decrypt_udp(data)
^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/discovery.py", line 30, in decrypt_udp
return _unpad(decryptor.update(message) + decryptor.finalize()).decode()
^^^^^^^^^^^^^^^^^^^^
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 "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 1238, in _read_ready
self._protocol.datagram_received(data, addr)
File "/config/custom_components/localtuya/discovery.py", line 67, in datagram_received
data = data.decode()
^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcb in position 0: invalid continuation byte
The text was updated successfully, but these errors were encountered: