-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
Home Assistant 2024.10 failed after update from 2024.9.3 #7231
Comments
I have a very similar or identical issue, but I don't have as many modules failing. I even tried purging the whole installation and starting fresh, but still get the errors. I submitted a BugReport via the dietpi-bugreport feature, and am including some logs here to help with this. ─────────────────────────────────────────────────────
Oct 03 10:51:34 pi3 Home Assistant[18272]: 2024-10-03 10:51:34.594 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tapo_control which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Oct 03 10:51:34 pi3 Home Assistant[18272]: 2024-10-03 10:51:34.598 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration midea_ac_lan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Oct 03 10:51:34 pi3 Home Assistant[18272]: 2024-10-03 10:51:34.601 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tapo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Oct 03 10:51:34 pi3 Home Assistant[18272]: 2024-10-03 10:51:34.604 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Oct 03 10:51:41 pi3 Home Assistant[18272]: 2024-10-03 10:51:41.803 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:51:46 pi3 Home Assistant[18272]: 2024-10-03 10:51:46.791 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:51:51 pi3 Home Assistant[18272]: 2024-10-03 10:51:51.732 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:51:56 pi3 Home Assistant[18272]: 2024-10-03 10:51:56.662 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:01 pi3 Home Assistant[18272]: 2024-10-03 10:52:01.600 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:06 pi3 Home Assistant[18272]: 2024-10-03 10:52:06.555 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:06 pi3 Home Assistant[18272]: 2024-10-03 10:52:06.557 ERROR (MainThread) [homeassistant.bootstrap] Home Assistant core failed to initialize. Further initialization aborted
Oct 03 10:52:06 pi3 Home Assistant[18272]: 2024-10-03 10:52:06.558 WARNING (MainThread) [homeassistant.bootstrap] Unable to set up core integrations. Activating recovery mode
Oct 03 10:52:11 pi3 Home Assistant[18272]: 2024-10-03 10:52:11.667 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:16 pi3 Home Assistant[18272]: 2024-10-03 10:52:16.646 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:21 pi3 Home Assistant[18272]: 2024-10-03 10:52:21.652 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:26 pi3 Home Assistant[18272]: 2024-10-03 10:52:26.677 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:31 pi3 Home Assistant[18272]: 2024-10-03 10:52:31.687 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:36 pi3 Home Assistant[18272]: 2024-10-03 10:52:36.751 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:36 pi3 Home Assistant[18272]: 2024-10-03 10:52:36.753 ERROR (MainThread) [homeassistant.bootstrap] Home Assistant core failed to initialize. Further initialization aborted |
I've solved my issue logging in as root and installing uv, creating a new venv with
#!/bin/bash
exec sudo -u homeassistant bash -c '. /home/homeassistant/pyenv-activate.sh; exec uv pip install -U homeassistant'
#!/bin/bash
if [ $(whoami) != 'homeassistant' ]; then
echo '[FAILED] This pyenv must be activated as user "homeassistant". Aborting...'
kill -INT $$
fi
cd /home/homeassistant
export PYENV_ROOT='/home/homeassistant/.venv'
export PATH="$PYENV_ROOT/bin:$PATH"
source .venv/bin/activate
[ -f '.cargo/env' ] && . .cargo/env |
Looks like one needs to pass |
is adding --system a quick fix till there is a patch? if so where should it be added to? or is the @domenicoblanco method the quick fix? |
The problem is A bigger problem might be that this way, also the Rust environment would be lost, potentially breaking installs on 32-bit ARM and RISC-V systems. @domenicoblanco method means a completely different Python instance environment, not using |
looks like restore is your uncle here till there is a perm fix :) |
Hmm, the
As if the directory would not complain PIP 405: https://peps.python.org/pep-0405/#specification |
Hmm homeassistant@VM-Bookworm:~$ echo $VIRTUAL_ENV
/mnt/dietpi_userdata/homeassistant/deps
homeassistant@VM-Bookworm:~$ uv pip install pyotp==2.8.0
error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
homeassistant@VM-Bookworm:~$ uv pip install --system pyotp==2.8.0
Resolved 1 package in 141ms
Prepared 1 package in 25ms
Installed 1 package in 1ms
+ pyotp==2.8.0
homeassistant@VM-Bookworm:~$ HA passes |
How do you roll it back to a previous version? And does this actually fix it? |
To downgrade you can do:
I did it on my instances and works fine. |
Thanks @Yougoshatenshi this is exactly what I would have suggested for now :) |
Downgrading worked a treat - thanks! Just have to resist the urge to update again now... 😁 |
I am getting |
Are you running the other commands as well? |
Let's see whether there is a different solution than adding an actual |
yes, I am first running |
@InnovoDeveloper echo $G_HW_MODEL_NAME $G_HW_ARCH_NAME $G_DISTRO_NAME |
NanoPi R5S/R5C (aarch64) aarch64 bookworm
NanoPi R5S/R5C (aarch64) aarch64 bookworm |
I am getting the following error, so this could be due to a different python version that I am running.
|
👋 I've provided some details on uv's virtual environment compliance checks and some possible workarounds at astral-sh/uv#7907 (comment) |
@InnovoDeveloper sudo -u homeassistant bash
. /home/homeassistant/pyenv-activate.sh can you run this again python3 --version It must be Python 3.12, otherwise Home Assistant 3.10 could not have been installed in the first place. |
Yes, I was mixing up the two. the python in the envelope is 3.12.3. still cannot roll back. I'll wait for a fix. |
- DietPi-Software | Home Assistant: Resolved an issue where the latest Home Assistant version did not start. Many thanks to @whyisthisbroken and others for reporting this issue: #7231 - DietPi-Software | Update fallback URLs
This should fix it: e7d4053 And to not wait for the update: sudo sed -i '/^export /a\export UV_SYSTEM_PYTHON=1' /home/homeassistant/pyenv-activate.sh Running automated tests, though since some builds are running, it will take a few hours: https://github.com/MichaIng/DietPi/actions/runs/11166786788 |
Thanks. Running 2024.10.0 with no issues. |
Do we run this before upgrading HA or afterwards? Or does it not make a difference? |
Before, so HA can initialize directly after the upgrade. Otherwise it does not make difference. |
Tested and working OK here now! |
Not sure if related - but now the Ring entity won't load in HA..
|
Yes there is another thing which needs to be changed. In the previous HA version, the sudo rm -R /mnt/dietpi_userdata/homeassistant/deps
sudo ln -sf /home/homeassistant/.pyenv/versions/3.12.*/lib/python3.12/site-packages /mnt/dietpi_userdata/homeassistant/deps
sudo systemctl restart home-assistant |
Well that did something.. now HA won't start again after running the restart command... |
"won't" start? The symlink is valid? And can you show logs again? ls -l /mnt/dietpi_userdata/homeassistant/deps
journalctl -u home-assistant |
The fix works for me as well. What does this |
So for my understanding:
Upgrade HA to the newest Version. Is this the right sequence to fix it ? |
Running journalctl.... yields far too many lines to post back here and takes forever to run EDIT - not sure why the command is getting struck-out |
Journal logs from today:
|
Got the same errors with deps. |
Guys there were unintended double-quotes in my comment. Please repair like this (also if you run into the original issue for the first time): sudo systemctl stop home-assistant
sudo grep -q 'UV_SYSTEM_PYTHON' /home/homeassistant/pyenv-activate.sh || sudo sed -i '/^export /a\export UV_SYSTEM_PYTHON=1' /home/homeassistant/pyenv-activate.sh
sudo rm -R /mnt/dietpi_userdata/homeassistant/deps
sudo ln -sf /home/homeassistant/.pyenv/versions/3.12.*/lib/python3.12/site-packages /mnt/dietpi_userdata/homeassistant/deps
sudo systemctl restart home-assistant The wildcard |
Hero - works like a charm now!! |
Works fine, thank you!
#!/bin/dash
if [ $(whoami) != 'homeassistant' ]; then
echo '[FAILED] This pyenv must be activated as user "homeassistant". Aborting...'
kill -INT $$
fi
cd /home/homeassistant
export PYENV_ROOT='/home/homeassistant/.pyenv'
- export UV_SYSTEM_PYTHON=1
export PATH="$PYENV_ROOT/bin:$PATH"
export UV_SYSTEM_PYTHON=1
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
[ -f '.cargo/env' ] && . .cargo/env |
Sorry for the delay, but technically my method uses a virtual environment, the only global package is uv. Edit: |
Yes, but a |
Oh okay, I didn't notice 😅 |
I reverted back to 9.3. How many weeks before this is sorted out and I can just upgrade from the dietpi server like I normally do? |
Either follow this: #7231 (comment) |
Thanks, I will wait until you release a DietPi update. |
Pretty sure the DietPi update will just contain the above fix anyway... So either way you'll get the same end result. |
The DietPi update will have
Above set of commands is hence a faster fix, bypassing the Python re-compilation etc. But it would be too much magic to add all this into the |
Sorry to necro what seems to be a resolved issue, but I get a problem when trying to do the above fix:
RPi 4 Model B (aarch64) aarch64 bookworm |
The camera component requires the libjpeg library: apt install libjpeg62-turbo
systemctl restart home-assistant |
ADMIN EDIT
To solve the issue now:
Creating a bug report/issue
Required Information
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=7
G_DIETPI_VERSION_RC=1
G_GITBRANCH='beta'
G_GITOWNER='MichaIng'
Linux HomeNetDNS 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Additional Information (if applicable)
Steps to reproduce
Expected behaviour
Actual behaviour
Extra details
error: No virtual environment found; run
uv venv
to create an environment, or pass--system
to install into a non-virtual environmentAfter Update and HA want start this comes...
Oct 03 08:15:58 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:58.320 ERROR (MainThread) [homeassistant.setup] Setup failed for 'recovery_mode': Could not setup dependencies: frontend, cloud
Example of most of the Errors coming during the installation:
The text was updated successfully, but these errors were encountered: