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

Homeassistant installs component requirements in the wrong location #4977

Closed
mortenlj opened this issue Nov 23, 2021 · 1 comment · Fixed by #5478
Closed

Homeassistant installs component requirements in the wrong location #4977

mortenlj opened this issue Nov 23, 2021 · 1 comment · Fixed by #5478
Assignees

Comments

@mortenlj
Copy link

mortenlj commented Nov 23, 2021

Setup

Package Name: homeassistant
Package Version: 2021.9.7-15

NAS Model: DS213+
NAS Architecture: FREESCALE QorIQ P1022
DSM version: DSM 6.2.4-25556 Update 2

Expected behavior

I enabled the pushover integration, and expected Home Assistant to install the required dependencies and start working.

Actual behavior

It looks like HA installs the dependencies in the wrong location, and then can't find it afterwards.

Logger: homeassistant.config
Source: components/pushover/notify.py:4
First occurred: 12:24:34 PM (1 occurrences)
Last logged: 12:24:34 PM

Platform error: notify
Traceback (most recent call last):
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/config.py", line 891, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/loader.py", line 524, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/loader.py", line 529, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/var/packages/python38/target/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/volume1/@appstore/homeassistant/env/lib/python3.8/site-packages/homeassistant/components/pushover/notify.py", line 4, in <module>
    from pushover_complete import PushoverAPI
ModuleNotFoundError: No module named 'pushover_complete'

HA seems to be running using a virtualenv in /volume1/@appstore/homeassistant/env, which contains all the pre-installed dependencies. I see the pushover package is installed into what looks like the user site-packages in /volume1/@appstore/homeassistant/.local/lib/python3.8/site-packages, but HA can't find it there.

Looking closer, it seems this also affects Chromecast, it is complaining about not finding pychromecast, which is also installed in the other location.

Steps to reproduce

1. Edit /volume1/@appstore/homeassistant/var/config/configuration.yaml and add a notify entry for Pushover
2. Check logs

Package log

Package log: homeassistant.log
Installer log: install-homeassistant.log

@hgy59
Copy link
Contributor

hgy59 commented Dec 19, 2022

I can confirm this finding:
some packages are installed into the user-site

# sudo -u sc-homeassistant /var/packages/homeassistant/target/env/bin/python -m site --user-site
/var/packages/homeassistant/target/.local/lib/python3.10/site-packages

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

Successfully merging a pull request may close this issue.

2 participants