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
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)
The text was updated successfully, but these errors were encountered:
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
to
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)
The text was updated successfully, but these errors were encountered: