home-assistant-libs / python-matter-server

Python server to interact with Matter
Apache License 2.0
495 stars 77 forks source link

ImportError after upgrading from 5.7.0 to 6.1.2 #774

Closed doubledgedboard closed 4 months ago

doubledgedboard commented 4 months ago
Jun 27 10:15:02 homeassistant python[797]:     from .server import MatterServer
Jun 27 10:15:02 homeassistant python[797]:   File "/srv/homeassistant/lib/python3.12/site-packages/matter_server/server/server.py", line 22, in <module>
Jun 27 10:15:02 homeassistant python[797]:     from ..common.helpers.api import APICommandHandler, api_command
Jun 27 10:15:02 homeassistant python[797]:   File "/srv/homeassistant/lib/python3.12/site-packages/matter_server/common/helpers/api.py", line 10, in <module>
Jun 27 10:15:02 homeassistant python[797]:     from matter_server.common.helpers.util import parse_value
Jun 27 10:15:02 homeassistant python[797]:   File "/srv/homeassistant/lib/python3.12/site-packages/matter_server/common/helpers/util.py", line 28, in <module>
Jun 27 10:15:02 homeassistant python[797]:     from chip.clusters.Types import Nullable
Jun 27 10:15:02 homeassistant python[797]:   File "/srv/homeassistant/lib/python3.12/site-packages/chip/clusters/__init__.py", line 26, in <module>
Jun 27 10:15:02 homeassistant python[797]:     from .Objects import (AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality,
Jun 27 10:15:02 homeassistant python[797]: ImportError: cannot import name 'Scenes' from 'chip.clusters.Objects' (/srv/homeassistant/lib/python3.12/site-packages/chip/clusters/Objects.py)

running alongside homeassistant core 2024.6.4

was working fine before the pip3 install --upgrade

upgrade output:

Installing collected packages: home-assistant-chip-clusters, python-matter-server
  Attempting uninstall: home-assistant-chip-clusters
    Found existing installation: home-assistant-chip-clusters 2024.2.1
    Uninstalling home-assistant-chip-clusters-2024.2.1:
      Successfully uninstalled home-assistant-chip-clusters-2024.2.1
  Attempting uninstall: python-matter-server
    Found existing installation: python-matter-server 5.7.0
    Uninstalling python-matter-server-5.7.0:
      Successfully uninstalled python-matter-server-5.7.0
Successfully installed home-assistant-chip-clusters-2024.5.2 python-matter-server-6.1.2
doubledgedboard commented 4 months ago

For posterity, I managed to get it working by doing a removal and then reinstall of python-matter-server, homeassistant-chip-core, and homeassistant-chip-clusters

Seems like something in the upgrade process was broken. Sadly I can't repro.