Skip to content
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

Script does not return available updates on Debian 12 Bookworm #166

Open
TAYALE opened this issue Nov 21, 2023 · 2 comments
Open

Script does not return available updates on Debian 12 Bookworm #166

TAYALE opened this issue Nov 21, 2023 · 2 comments

Comments

@TAYALE
Copy link

TAYALE commented Nov 21, 2023

Bookworm expects an VirtualEnv. Created it and changed the ExecStart in the service-file to:
/root/system_sensors/.venv/bin/python3 /root/system_sensors/src/system_sensors.py /root/system_sensors/src/settings.yaml

I do get a lot of sensors but not the 'Available updates' and cannot figure out why. Of course it is set to true in the settings.yaml.

@mdisabato
Copy link

I am getting the following when I run the script from console:

user@host: ~/system_sensors $ system_sensors_venv/bin/python3 src/system_sensors.py src/settings.yaml
Unable to import apt package. Available updates will not be shown.
Sending config message to host...
Connected to broker
subscribing : hass/status

The second line is the error. I am trying to learn how to import "apt" into the virtual environment. That might fix this issue.

@mdisabato
Copy link

mdisabato commented Feb 2, 2024

I found this...
At this link: https://www.raspberrypi.com/documentation/computers/os.html#using-pip-with-virtual-environments it says to start the virtual environment using this command:

python -m venv --system-site-packages env.

I used:

python3 -m venv system_sensors_venv --system-site-packages

and this has cleared the error.

YMWV. :)

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants