MTrab / landroid_cloud

Landroid Cloud component for Home Assistant
GNU General Public License v3.0
266 stars 33 forks source link

After upgrade ... No module named 'pyworxcloud.clouds' #138

Closed maury77 closed 2 years ago

maury77 commented 2 years ago

Environment:

After upgrade I have this error

Package landroid setup failed. Integration landroid_cloud No module named 'pyworxcloud.clouds'

Papi77 commented 2 years ago

My integration also broke - getting many errors, eg:

This error originated from a custom integration.

Logger: custom_components.landroid_cloud.config_flow Source: custom_components/landroid_cloud/config_flow.py:23 Integration: Landroid Cloud (documentation, issues) First occurred: 4:50:05 AM (2 occurrences) Last logged: 4:50:05 AM

Unexpected exception Traceback (most recent call last): File "/config/custom_components/landroid_cloud/config_flow.py", line 98, in async_step_import await validate_input(self.hass, import_config) File "/config/custom_components/landroid_cloud/config_flow.py", line 23, in validate_input data[CONF_TYPE] = "worx" TypeError: 'str' object does not support item assignment

Logger: homeassistant.components.automation.landroid_l_sync_values Source: helpers/script.py:1718 Integration: Automation (documentation, issues) First occurred: 4:50:49 AM (1 occurrences) Last logged: 4:50:49 AM

Sync Values: Error executing script. Invalid data for call_service at pos 3: string value is None for dictionary value @ data['option']

Logger: homeassistant.components.automation.landroid_l_sync_values Source: components/automation/init.py:525 Integration: Automation (documentation, issues) First occurred: 4:50:49 AM (1 occurrences) Last logged: 4:50:49 AM

Error while executing automation automation.landroid_l_sync_values: string value is None for dictionary value @ data['option']

EDIT: In my case I'm using Landroid L1000 model

MTrab commented 2 years ago

@maury77 I cannot reproduce this error.

Can you provide a debug log and a device model, please?

maury77 commented 2 years ago

ok the problem is on startup e init module I set custom_components.landroid_cloud: debug pyworxcloud: debug

In debug mode trace only line

[homeassistant.config] Package landroid setup failed. Integration landroid_cloud No module named 'pyworxcloud.clouds' (See /mnt/dietpi_userdata/homeassistant/packages/landroid.yaml:6).

In Landoird yaml is

landroid_cloud: email: xxxxx password: xxxx*

type: landxcape

type: kress

MTrab commented 2 years ago

That doesn't look like a valid config!

Correct format is:

landroid_cloud:
  - email: xxxxx
    password: xxxx*
maury77 commented 2 years ago

I change it but the same problem

landroid_cloud:

what package is pyworxcloud.clouds? can I manually donwload?

MTrab commented 2 years ago

It's a part of the pyworxcloud PyPi module that landroid_cloud have as a requirement

maury77 commented 2 years ago

homeassistant@sdomotica:~$ pip3 install pyworxcloud Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/ Requirement already satisfied: pyworxcloud in ./.pyenv/versions/3.9.10/lib/python3.9/site-packages (1.4.15)

MTrab commented 2 years ago

1.4.15?! That's not the one mentioned in manifest.json. The current release is 2.0.2. That would definitely be an issue for you.

maury77 commented 2 years ago

I remove pyworxcloud and I reinstall with last versione

pip3 install pyworxcloud Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/ Collecting pyworxcloud Using cached https://www.piwheels.org/simple/pyworxcloud/pyworxcloud-2.0.1-py3-none-any.whl (13 kB) Collecting paho-mqtt>=1.6.1 Using cached https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-1.6.1-py3-none-any.whl (75 kB) Collecting pyOpenSSL>=22.0.0 Using cached https://www.piwheels.org/simple/pyopenssl/pyOpenSSL-22.0.0-py2.py3-none-any.whl (55 kB) Requirement already satisfied: cryptography>=35.0 in ./.pyenv/versions/3.9.10/lib/python3.9/site-packages (from pyOpenSSL>=22.0.0->pyworxcloud) (36.0.2) Requirement already satisfied: cffi>=1.12 in ./.pyenv/versions/3.9.10/lib/python3.9/site-packages (from cryptography>=35.0->pyOpenSSL>=22.0.0->pyworxcloud) (1.15.0) Requirement already satisfied: pycparser in ./.pyenv/versions/3.9.10/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=35.0->pyOpenSSL>=22.0.0->pyworxcloud) (2.21) Installing collected packages: paho-mqtt, pyOpenSSL, pyworxcloud Successfully installed paho-mqtt-1.6.1 pyOpenSSL-22.0.0 pyworxcloud-2.0.1

And the problem is solved

should the system download the latest version by itself?

MTrab commented 2 years ago

Yes it does - and 2.0.1 is not the latest version. Seems like your system has some issues

maury77 commented 2 years ago

https://pypi.org/project/pyworxcloud/

2.0.1 in this env

MTrab commented 2 years ago

Sorry - was a version ahead in my dev :D You're correct :)