-
-
Notifications
You must be signed in to change notification settings - Fork 15
Description
home-assistant/core#116223 (comment)
I had a similar issue when upgrading my HA instance from 2024.1.5 to 2024.7.2 yesterday and was about to open a PR when I saw this one that looks similar.
It is probably because you are using non UTF-8 characters in your PTZ label(s) for that camera like I do, e.g. "entrée" (vs "entree"), see in your log file
File "/usr/local/lib/python3.12/site-packages/axis/interfaces/parameters/param_cgi.py", line 39, in _api_request
return params_to_dict(bytes_data.decode()).get("root") or {}
^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1357: invalid continuation byte
I guess that if you modify L39 of interfaces/parameters/param_cgi.py in the axis library from
return params_to_dict(bytes_data.decode().get("root") or {}
to
return params_to_dict(bytes_data.decode(encoding='latin-1')).get("root") or {}
it will work again. Alternative is to rename/only use UTF-8 characters for PTZ labels
Not sure why/when this changed between these two versions but somehow HA locales should be taken into account ('latin-1' is only a workaround that will work for western EU)