Closed ds7771 closed 1 year ago
Hi, sorry you're getting this problem... So far I haven't been able to reproduce it, which make fixing quite hard... My first idea would be a conflict between the requirements of the core integration vs the ones of the custom component sharing the same domain name. But I don't know how to go further for now...
Thanks. I got it working by installing pyvesync library manually into the custom component folder.
I did validate that HA core has python 3.11.4 installed.
But I noticed that the Pi OS is still running back level Python 3.9.2. I wonder if the vesync component is looking for Python in the docker host environment rather than inside the container, and it's finding 3.9.2 instead of 3.11 - throwing up an error. Just a suspicion. I will upgrade Python on the host and see if that resolves the issue.
SO, Im not really sure what I did; but in the process of trying to install and reinstall Python 3.11 libraries and vesync I must have repaired the dependency issue. The conflg workflow seems to work fine now, even on a fresh intall. Thanks the the assistance.
'There hasn't been any activity on this issue recently. Is this issue still present? Please make sure to update to the latest Home Assistant version and version of this integration to see if that solves the issue. Let us know if that works for you by adding a comment 👍. This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.'
The problem
Received this error when trying to add the custom component integration:
Error logs provide further detail:
What version of this integration has the issue?
1.0.2
What version of Home Assistant Core has the issue?
2023.8.3
Diagnostics
Diagnostics
```json Copy/paste diagnostics here between the starting and ending backticks. ```Home Assistant log
Log
```py 2023-08-22 22:12:10.882 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration vesync: cannot import name 'model_features' from 'pyvesync.vesyncfan' (/usr/local/lib/python3.11/site-packages/pyvesync/vesyncfan.py) 2023-08-22 22:12:10.884 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2037, in _load_integration integration.get_platform("config_flow") File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Additional information
In case it helps, please be aware that my HA instance is a docker container on RPI.
I have already tried purging the container and rebuilding the core from scratch. The container has the latest pyvesync 2.1.9 installed
For some reason the integration is not correctly pulling from the core pyvesync library. I was able to fix the error by installing a standalone version of pyvesync into the custom component folder, as described in issue #27.