hacs / integration

HACS gives you a powerful UI to handle downloads of all your custom needs.
https://hacs.xyz
MIT License
5.42k stars 1.29k forks source link

Error when upgrading Dreame integration (utf-8' codec can't decode byte 0xb2 in position 7312: invalid start byte) #3484

Closed yieldhog closed 9 months ago

yieldhog commented 9 months ago

System Health details

System Information

version core-2024.1.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.71-haos
arch x86_64
timezone America/Denver
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4960 Installed Version | 1.34.0 Stage | running Available Repositories | 1452 Downloaded Repositories | 27 HACS Data | ok
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | August 5, 2024 at 6:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | false remote_server | us-east-1-7.ui.nabu.casa certificate_status | ready instance_id | fc01132c209f40a2b814667e8594abd3 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.4 -- | -- update_channel | stable supervisor_version | supervisor-2023.12.1 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 468.7 GB disk_used | 46.4 GB healthy | true supported | true board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | Samba share (12.2.0), Studio Code Server (5.15.0), Home Assistant Google Drive Backup (0.112.1), Ring-MQTT with Video Streaming (5.6.3), AirSonos (4.2.0), Z-Wave JS UI (3.3.0), Z-Wave JS (0.4.3), Zigbee2MQTT (1.35.1-1), ESPHome (2023.12.9), ecowitt2mqtt (2024.01.2), AdGuard Home (5.0.2), Terminal & SSH (9.8.1), Scrypted (18-jammy-full.s6-v0.91.6), rtlamr2mqtt (2.3.4), Frigate (0.12.1), Double Take (1.13.11.8), Exadel CompreFace (1.1.0)
Dashboards dashboards | 1 -- | -- resources | 11 views | 10 mode | storage
Recorder oldest_recorder_run | December 28, 2023 at 8:37 PM -- | -- current_recorder_run | January 27, 2024 at 1:35 PM estimated_db_size | 1664.03 MiB database_engine | sqlite database_version | 3.41.2

Checklist

Describe the issue

Dreame Vacuum upgrade from v2.0.0b6 to v2.0.0b11 receive the following error:

"Failed to call service update/install. 'utf-8' codec can't decode byte 0xb2 in position 7312: invalid start byte"

Reproduction steps

  1. Install (update) Dreame vacuum integration

Debug logs

[140214863377856] 'utf-8' codec can't decode byte 0xb2 in position 7312: invalid start byte
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 882, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 161, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 465, in async_install_with_progress
    await self.async_install(version, backup)
  File "/config/custom_components/hacs/update.py", line 124, in async_install
    await self.repository.async_install(version=version)
  File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install
    await self.async_install_repository(version=version)
  File "/config/custom_components/hacs/repositories/base.py", line 927, in async_install_repository
    await self.update_repository(force=version is None)
  File "/config/custom_components/hacs/utils/decorator.py", line 28, in wrapper
    result = await function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/repositories/integration.py", line 115, in update_repository
    if not await self.common_update(ignore_issues, force) and not force:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/utils/decorator.py", line 28, in wrapper
    result = await function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/repositories/base.py", line 555, in common_update
    self.additional_info = await self.async_get_info_file_contents()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/repositories/base.py", line 747, in async_get_info_file_contents
    return await self.get_documentation(filename=info_files[0]) or ""
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/repositories/base.py", line 1353, in get_documentation
    result.decode(encoding="utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 7312: invalid start byte

Diagnostics dump

No response

hacs-bot[bot] commented 9 months ago

Make sure you have read the issue guidelines and that you filled out the entire template.

If you have an issue identical to this, do not add comments like "same here", "i have this too", instead add a :+1: reaction to the issue description. Thanks! :+1:

ludeeus commented 9 months ago

The documentation of that repo contains this which is not valid:

  cleaning:
    - attribute: cleaned_area
      unit: m�

It is the part that makes it invalid. You should report that to the author of that repository. https://raw.githubusercontent.com/Tasshack/dreame-vacuum/v2.0.0b11/README.md