core: dbus-fast version inconsistency
The problem
I just tried installing the latest version of Home Assistant in a virtual environment.
I installed Home Assistant with pip install homeassistant. During install, I can see Successfully installed ... dbus-fast-1.82.0 ...
After installing, I run hass to initialize everything. Eventually it errors out and says FileNotFoundError: [Errno 2] No such file or directory: '/srv/homeassistant/lib/python3.11/site-packages/dbus_fast-1.82.0.dist-info/METADATA'
After some digging, it looks like homeassistant/package_constraints.txt and homeassistant/components/bluetooth/manifest.json explicitly specify dbus-fast==1.75.0. So during initialization, it installs dependencies, downgrades dbus-fast, and then it cannot find the original dbus_fast-1.82 files.
It seems like the dbus-fast version needs to be consistent.
What version of Home Assistant Core has the issue?
homeassistant-2022.12.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 10
- Comments: 19 (5 by maintainers)
Commits related to this issue
- Bump home-assistant-bluetooth to 1.9.1 fixes #83722 — committed to home-assistant/core by bdraco a year ago
- Bump home-assistant-bluetooth to 1.9.1 (#85005) fixes #83722 — committed to home-assistant/core by bdraco a year ago
- Bump home-assistant-bluetooth to 1.9.1 (#85005) fixes #83722 — committed to home-assistant/core by bdraco a year ago
- Bump home-assistant-bluetooth to 1.9.1 (#85005) fixes #83722 — committed to mkmer/HomeAssistant_Core by bdraco a year ago
- Bump home-assistant-bluetooth to 1.9.1 (#85005) fixes #83722 — committed to rlippmann/core by bdraco a year ago
The workaround I used was to manually change
/srv/homeassistant/lib/python3.11/site-packages/homeassistant/package_constraints.txtand/srv/homeassistant/lib/python3.11/site-packages/homeassistant/components/bluetooth/manifest.jsonto havedbus-fast==1.82instead ofdbus-fast==1.75.0Then, when you run
hassagain, it will redownload dependencies and will use the correct 1.82 versionFor 2023.1.0b*
For 2022.12.8
Also needed after any Core update
+1, facing the same dbus-fast issue on my HA install in virtual env (after successful migration to Python 3.10).
For the time being, I’ve applied the workaround suggested above (manually setting dbus-fast=1.82 in the two site-packages/homeassistant/package_constraints.txt and site-packages/homeassistant/components/bluetooth/manifest.json) and that worked fine for me. However, I also feel a proper fix is needed here.
No compatibility issues besides this one with
dbus-fast. It has all been working just fine. I’m not sure if there are really any advantages to Python 3.11 over 3.10 for Home Assistant. The only thing might be that Home Assistant will be easier to upgrade longer (since Python 3.11 won’t be deprecated for a long time). However, other compatibility issues might pop up 🤷♂️This also happened to me with my HomeKit Controller (and Bluetooth) integrations, while doing a dodgy upgrade from python3.9 -> 3.10
Above fixes
dbus-fast==1.82andbleak==0.19.5fixed thingsOkay, after similarly adapting bleak-0.19.2 to 0.19.5 the initialization seems to run without further errors now and I can reach the Home Assistant site. Thanks again for your very valuable input!