bushvin / hass-integrations

My custom Home Assistant integrations
Apache License 2.0
61 stars 11 forks source link

Unexpected exception importing platform (HA 2024.1.3) #65

Closed TNTLarsn closed 7 months ago

TNTLarsn commented 7 months ago

Logger: homeassistant.loader
Source: loader.py:842
First occurred: 20:53:29 (1 occurrences)
Last logged: 20:53:29

Unexpected exception importing platform custom_components.mopidy.media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/mopidy/media_player.py", line 162, in <module>
    class MopidyMediaPlayerEntity(MediaPlayerEntity):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 408, in __init__
    wrap_attr(cls, property_name)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 380, in wrap_attr
    raise TypeError(f"Can't override {attr_name} in subclass")
TypeError: Can't override _attr_state in subclass
KingTeppic commented 7 months ago

Confirm I get the same critical error... These 2024.1.x updates to the Home Assistant Core aren't playing nice to mopidy media_player.

bushvin commented 7 months ago

Should be resolved with the v2.3.2 release => git commit 5b37fcb1cf960e3892d4a749f2b0746466d112a5

bushvin commented 7 months ago

Confirm I get the same critical error... These 2024.1.x updates to the Home Assistant Core aren't playing nice to mopidy media_player.

let's hope there's not going to be more breaking changes now. I did intend to perform the cleanup I just did, but HA beat me to it ;)

TNTLarsn commented 7 months ago

Solved for me. Thank you

chatziko commented 7 months ago

Solved also for me, thanks for the quick fix!