-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BIG problem after upgrade HA pyton 3.10 #6117
Comments
any reason not filling the bug report template? Required
|
any Idea I rollback is ok ! now I try upgrade new and the same errore HELP |
I update my post with data
DietPi version |
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=13
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'
G_LIVE_PATCH_STATUS[1]='not applicable'
Distro version | bullseye 1
Kernel version | uname -a
SBC model | ***@***.***:~# uname -a
Linux sdomotica 5.15.84-v7+ #1613
<#1613> SMP Thu Jan 5 11:59:48 GMT
2023 armv7l GNU/Linux
SDcard used | (EG: SanDisk ultra 32GB)
Home Assistant system log | journalctl -u home-assistant
Il giorno mer 8 feb 2023 alle ore 12:23 Joulinar ***@***.***>
ha scritto:
… again, you did not answer my question. Do this first, afterwards we could
assist.
—
Reply to this email directly, view it on GitHub
<#6117 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIQXHLHO6DCBAOKODSMXWWLWWN6Z5ANCNFSM6AAAAAAUKL2DUU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You did already try to restart the service and wait until all needed dependencies have been installed, watching systemctl restart home-assistant Otherwise, please try to that again after (re)moving the deps directory: mv /mnt/dietpi_userdata/homeassistant/deps /mnt/dietpi_userdata/homeassistant/deps.bak
systemctl restart home-assistant
htop |
I found the problem The installation with dietpi-software reinstall 157 not install sqlalchemye I have install the last version (2.02( that is not compatible with stack , I try install 1.46 and the problem is resolved |
Ah, then I wonder whether the dependency was missed to be declared in one of the integration you use. Usually HA installs them automatically on startup or when accessing features the first time. But great that you found the solution 👍. |
I guess one of the installed python packages is not compatible with SQLAlchemy v2. Probably some wheels would need to be updated by the individual maintainer https://docs.sqlalchemy.org/en/20/errors.html#error-zlpr SQLAlchemy v2 has been released 2 weeks back. If not specified, it will be pulled automatically as latest version available https://www.piwheels.org/project/sqlalchemy/ |
Ah this can be the cause as well of course. I understood it so that SQLAlchemy was not installed OOTB but manually, in which case v2 is pulled. Since the integrations are no Python modules (are they?) and their dependencies are not installed into the system's or pyenv Python environment, but into this dedicated |
the integrations should all be python modules, here it was the native recorder module After upgrade there was no SQLAlchemy and I had installed it manually |
That is right, but those are also not installed into the regular Python environment, so |
root@sdomotica:/mnt/dietpi_userdata/homeassistant/deps# ls -al
totale 52
drwxrwxr-x 8 homeassistant homeassistant 4096 27 dic 16.21 .
drwxrwxr-x 15 homeassistant homeassistant 4096 14 feb 16.15 ..
drwxr-xr-x 3 homeassistant homeassistant 4096 8 feb 13.04 bin
drwxr-xr-x 2 homeassistant homeassistant 4096 8 feb 11.53 cache
-rw-r--r-- 1 homeassistant homeassistant 15 6 mar 2021 ciso-requirements.txt
drwxr-xr-x 2 homeassistant homeassistant 4096 11 ott 23.22 doc
-rw-r--r-- 1 homeassistant homeassistant 21 6 mar 2021 extra-requirements.txt
drwxr-xr-x 3 homeassistant homeassistant 4096 9 mag 2021 include
drwxr-xr-x 5 homeassistant homeassistant 4096 8 feb 11.45 lib
-rw-r--r-- 1 homeassistant homeassistant 1065 27 dic 16.21 LICENSE
-rw-r--r-- 1 homeassistant homeassistant 121 6 mar 2021 requirements.txt
drwxr-xr-x 3 homeassistant homeassistant 4096 10 feb 2020 share
-rw-r--r-- 1 homeassistant homeassistant 114 6 mar 2021 test-requirements.txt
root@sdomotica:/mnt/dietpi_userdata/homeassistant/deps# more requirements.txt
rx >= 3.0.1
certifi >= 14.05.14
six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.15.1
pytz>=2019.1
root@sdomotica:/mnt/dietpi_userdata/homeassistant/deps# more extra-requirements.txt
pandas>=0.25.3
numpy |
- DietPi-Software | Home Assistant: Our Home Assistant integration used two Python environments: A pyenv is used to install the "homeassistant" core module and its direct dependencies. Home Assistant itself installs its frontend with dependencies on startup, as well as dependencies for integrations on demand, internally into another Python environment. On Home Assistant reinstalls, pyenv is removed but the internal dependencies were left untouched. This caused issues when those dependency builds were incompatible with the new pyenv Python version, or conflicting with other pyenv module upgrades. Both environments are now merged and reset on every reinstall, which solves potential conflicts but means that the first Home Assistant startup after a reinstall takes longer. Many thanks to @maury77 for reporting a related issue: #6117
Did you create these I tested back and forth, and HA is actually quite robust working with merged pyenv and deps environments. Even if you cause conflicts by upgrading everything to versions not supported by the integrations, HA automatically downgrades affected modules, reinstalls missing ones etc. Hence: a677610 Little bonus is that one can upgrade or cleanup the internal deps as well, within the borders or what the integrations support. One however cannot break it, as HA automatically assures that all dependencies are met, as mentioned 🙂. |
I have not created them manually, I think they are old things after several upgrades |
Sorry , I try to upgrade tu minor version 2023.3.1 but I have new crash with sqlaalchemy and HA don't start with many error as type Setup failed for recorder: Unable to import component: cannot import name 'ColumnElement' from 'sqlalchemy' |
How did you try to upgrade HA, via Unexpected if the Python version itself has not changed. However, for now, before you reinstall it: rm -R /mnt/dietpi_userdata/homeassistant/deps This will be done automatically on reinstalls after next DietPi release. Ah, you can do this also without a reinstall, and just restart the service afterwards, to solve the issue now: rm -R /mnt/dietpi_userdata/homeassistant/deps
systemctl restart home-assistent HA installs all needed dependencies on demand then. |
I use this script exec sudo -u homeassistant dash -c '. /home/homeassistant/pyenv-activate.sh; exec pip3 install --no-cache-dir -U homeassistant' |
A little simpler 🙂: /home/homeassistant/homeassistant-update.sh It does the sudo stuff automatically. But indeed strange how it could have caused that issue then. If any other sqlalchemy version was needed, if would have pulled it as dependency, and as well on service start, this should be part of the automatic deps installs. |
the problem is the same of the initial issue. Also upgrade with "/home/homeassistant/homeassistant-update.sh" doesn't install right version of SQLAlchemy In the 2023.3.1 SQLAlchemy 2.0.2 is necessary and I had the 1.46 I install manualy SQLAlchemy 2.0.2 ando now it is ok |
Then there is a dependency conflict within Home Assistent, respectively between Home Assistant and one of your integrations. An older SQLAlchemy wouldn't be installed of not either HA or an integration declares to be not compatible with the recent one. Do you find SQLAlchemy within sudo -u homeassistant dash -c '. /home/homeassistant/pyenv-activate.sh; exec pip3 freeze' ? |
See #6931 |
DietPi version |
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=13
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'
G_LIVE_PATCH_STATUS[1]='not applicable'
Distro version | bullseye 1
Kernel version | uname -a
SBC model | root@sdomotica:~# uname -a
Linux sdomotica 5.15.84-v7+ #1613 SMP Thu Jan 5 11:59:48 GMT 2023 armv7l GNU/Linux
SDcard used | (EG: SanDisk ultra 32GB)
Home Assistant system log | journalctl -u home-assistant
After reinstall HA via dietpi I have big issue
The HA don't start gui adn service the ripetitive error is
The text was updated successfully, but these errors were encountered: