outon / HomeAssistant-AEMET

AEMET: Home Assistant Custom Weather Component
MIT License
11 stars 7 forks source link

Platform error weather.aemet - No module named 'jsonpath_rw' #6

Closed diazdeespada closed 4 years ago

diazdeespada commented 4 years ago

HI,

I have the next error: _Platform error weather.aemet - No module named 'jsonpathrw' when restart the HA.

Thanks

outon commented 4 years ago

Hi,

I do not know exactly if this is an error or not. I had the same error when I first start to develop this module, as far as I can remember, I think that I solved installing module jsonpath-rw and also jsonpath_rw although they are the same module.

The module is named jsonpath-rw but later on code it imports jsonpath_rw. So, on my manifest.json file I have included the name of module as developer has in its documentation: jsonpath-rw

If you can access your HA installation try with

pip install jsonpath_rw
pip install jsonpath-rw

In either cases you should get the messages that module is already installed:

pip install jsonpath_rw Requirement already satisfied: jsonpath_rw in d:\homeassistant-aemet\venv\lib\site-packages (1.4.0) Requirement already satisfied: ply in d:\homeassistant-aemet\venv\lib\site-packages (from jsonpath_rw) (3.11) Requirement already satisfied: decorator in d:\homeassistant-aemet\venv\lib\site-packages (from jsonpath_rw) (4.4.0) Requirement already satisfied: six in d:\homeassistant-aemet\venv\lib\site-packages (from jsonpath_rw) (1.12.0)

Please let me know if this issue is solved by manually installing the modules or should I raise this error to module developer. In that case I will need you HA logs showing this error.

diazdeespada commented 4 years ago

Now, the problem is other. aemet Thanks.

outon commented 4 years ago

The script create a directory called aemet on /config/aemet in your case it should be on /home/homeassistant/.homeassistant/aemet

The directory is used to cache some information like list of weather stations or list of cities.

It seems like you don't have the permissions to create that directory.

For workaround, create the directory manually. Looks like I need to improve the usage of cache directory, and it will take some time.

diazdeespada commented 4 years ago

The other thing you told me solved another problem with the alexa custom component.

Thanks a lot.

outon commented 4 years ago

Me alegro que de una tacada solventásemos dos problemas.

Quizás deberíamos escalar el problema al desarrollador de JSONPATH-RW.... ¿Tienes todavía los LOG de HA del fallo de JSONPATH_RW? Aunque trataré de reproducirlo en una VM.

Como workaround pondré que se necesitan ambos paquetes el JSONPATH-RW y el JSONPATH_RW.