music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.34k stars 49 forks source link

Music Assistant 2.2.7 + Home Assistant 2024.10.0 #3003

Open Links2004 opened 1 week ago

Links2004 commented 1 week ago

What version of Music Assistant has the issue?

2.2.7

What version of the Home Assistant Integration have you got installed?

2024.9.1

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

Music Assistant and Home Assistant 2024.10.0 have conflicting pip modules.

home-assistant-7f697659b-sw9f4:/config/deps# pip install music-assistant==2.2.4  --target ~/.homeassistant/deps

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
homeassistant 2024.10.0 requires attrs==23.2.0, but you have attrs 24.2.0 which is incompatible.
zhong-hong-hvac 1.0.12 requires attrs<24.0.0,>=23.1.0, but you have attrs 24.2.0 which is incompatible.
Successfully installed aiohappyeyeballs-2.4.3 aiohttp-3.10.8 aiosignal-1.3.1 attrs-24.2.0 frozenlist-1.4.1 idna-3.10 mashumaro-3.13.1 multidict-6.1.0 music-assistant-2.2.4 orjson-3.10.7 typing-extensions-4.12.2 yarl-1.13.1

How to reproduce

Install Music Assistant HASS via HACS --> will not work.

Music Providers

N/A

Player Providers

N/A

Full log output

No response

Additional information

looks like a new release is needed?

What version of Home Assistant Core are your running

2024.10.0

What type of installation are you running?

Home Assistant Container

On what type of hardware are you running?

Linux

OzGav commented 1 week ago

What are you actually trying to do and how are you doing it. I have 2.2.7 and 2024.10.0 running no problems. I don't understand why you are trying to pip install?

Links2004 commented 1 week ago

I installed the Music Assistant Integration via HACS in the latest version (2024.9.1), but this did not work. The logs complained that the package music-assistant was not found.

the HA docs explain how to test and install packages here: https://developers.home-assistant.io/docs/creating_integration_manifest/#custom-requirements-during-development--testing

the music-assistant==2.2.4 comes from:

https://github.com/music-assistant/hass-music-assistant/blob/5adff083b4a5131f16ccc4a480df30be001a1db8/custom_components/mass/manifest.json#L10-L12

not sure why but the the integration still uses 2.2.4.

OzGav commented 1 week ago

Did you install the server first?

Links2004 commented 1 week ago

the server is running as a second container and is working.

OzGav commented 1 week ago

Did you already have the integration installed when you upgraded HA to 2024.10.0?

Links2004 commented 6 days ago

no its a new install of the integration on HA 2024.10.0

message one HA restart:

home-assistant-85c7cc475c-rbn96 home-assistant 2024-10-05 11:40:28.481 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'mass': Unable to import component: No module named 'music_assistant'
home-assistant-85c7cc475c-rbn96 home-assistant Traceback (most recent call last):
home-assistant-85c7cc475c-rbn96 home-assistant   File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component
home-assistant-85c7cc475c-rbn96 home-assistant     component = await integration.async_get_component()
home-assistant-85c7cc475c-rbn96 home-assistant                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant-85c7cc475c-rbn96 home-assistant   File "/usr/src/homeassistant/homeassistant/loader.py", line 1027, in async_get_component
home-assistant-85c7cc475c-rbn96 home-assistant     self._component_future.result()
home-assistant-85c7cc475c-rbn96 home-assistant   File "/usr/src/homeassistant/homeassistant/loader.py", line 1007, in async_get_component
home-assistant-85c7cc475c-rbn96 home-assistant     comp = await self.hass.async_add_import_executor_job(
home-assistant-85c7cc475c-rbn96 home-assistant            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant-85c7cc475c-rbn96 home-assistant   File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
home-assistant-85c7cc475c-rbn96 home-assistant     result = self.fn(*self.args, **self.kwargs)
home-assistant-85c7cc475c-rbn96 home-assistant              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant-85c7cc475c-rbn96 home-assistant   File "/usr/src/homeassistant/homeassistant/loader.py", line 1067, in _get_component
home-assistant-85c7cc475c-rbn96 home-assistant     ComponentProtocol, importlib.import_module(self.pkg_path)
home-assistant-85c7cc475c-rbn96 home-assistant                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant-85c7cc475c-rbn96 home-assistant   File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
home-assistant-85c7cc475c-rbn96 home-assistant     return func(*args, **kwargs)
home-assistant-85c7cc475c-rbn96 home-assistant            ^^^^^^^^^^^^^^^^^^^^^
home-assistant-85c7cc475c-rbn96 home-assistant   File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
home-assistant-85c7cc475c-rbn96 home-assistant     return _bootstrap._gcd_import(name[level:], package, level)
home-assistant-85c7cc475c-rbn96 home-assistant            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
home-assistant-85c7cc475c-rbn96 home-assistant   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
home-assistant-85c7cc475c-rbn96 home-assistant   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
home-assistant-85c7cc475c-rbn96 home-assistant   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
home-assistant-85c7cc475c-rbn96 home-assistant   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
home-assistant-85c7cc475c-rbn96 home-assistant   File "<frozen importlib._bootstrap_external>", line 995, in exec_module
home-assistant-85c7cc475c-rbn96 home-assistant   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
home-assistant-85c7cc475c-rbn96 home-assistant   File "/config/custom_components/mass/__init__.py", line 20, in <module>
home-assistant-85c7cc475c-rbn96 home-assistant     from music_assistant.client import MusicAssistantClient
home-assistant-85c7cc475c-rbn96 home-assistant ModuleNotFoundError: No module named 'music_assistant'
OzGav commented 6 days ago

Yeah ok that might be the problem. You will have to be patient until someone has time to further look at this

Links2004 commented 6 days ago

No problem, my current automatons with mopidy + snapcast are working, but Music Assistant has a better UI an more features ;)