masaccio / ha-kingspan-watchman-sensit

Kingspan Connect Sensor integration for Home Assistant
MIT License
9 stars 0 forks source link

Error occurred loading flow for integration kingspan_watchman_sensit: No module named 'pandas' #13

Closed CyberChrisG closed 9 months ago

CyberChrisG commented 9 months ago

Core 2023.11.2 Frontend 20231030.2

Arch Linux - fully updated

Describe the issue When I try and add the integration the following error is produced: ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration kingspan_watchman_sensit: No module named 'pandas'

Reproduction steps Download latest release via HACs 1.6.2 Restart Home Assistant Try and install via add integration

Debug 2023-11-16 21:21:43.353 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139854132849216] xxx from 192.168.0.135 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0): Sending {"id":110,"type":"result","success":true,"result":[{"name":"homeassistant.config_entries","message":["Error occurred loading flow for integration kingspan_watchman_sensit: No module named 'pandas'"],"level":"ERROR","source":["config_entries.py",2077],"timestamp":1700169696.9958405,"exception":"","count":2,"first_occurred":1700169564.1944149},{"name":"homeassistant","message":["Error doing job: Task exception was never retrieved"],"level":"ERROR","source":["setup.py",417],

CyberChrisG commented 9 months ago

OK I had a thought re user permissions and had a look in the home-assistant.service file.

It was running as the correct user however I did notice the command to manually install packages in there as it must check on start-up. Using this I ran this for pandas and it then worked. I still have no idea why it does not install it via the normal installation method.

The command I used for my system was: sudo /var/lib/hass/.venv/bin/python -m pip install pandas

As I installed as root I then went into the folder and updated the ownership to hass/hass. folder location below in my case. /var/lib/hass/.venv/lib/python3.11/site-packages

masaccio commented 9 months ago

It’s a bit odd that it even needs pandas as I removed the dependency and only use it in tests now. Glad you found a solution for your install though. If you spot why pandas was being pulled in, do reopen this.