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

'NoneType' object is not iterable #30

Open
Ekman opened this issue Nov 24, 2024 · 1 comment
Open

'NoneType' object is not iterable #30

Ekman opened this issue Nov 24, 2024 · 1 comment

Comments

@Ekman
Copy link
Contributor

Ekman commented Nov 24, 2024

I started getting the below error, as of a couple of days ago:

2024-11-24 17:32:48.550 ERROR (MainThread) [custom_components.purei9.coordinator] Unexpected error fetching 900277466035000711100106 data: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/purei9/coordinator.py", line 34, in _async_update_data
    return await self.hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/purei9/coordinator.py", line 62, in update_and_create_params
    params.maps = list(map(purei9.params_map_create, self._robot.getMaps()))
                                                     ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/purei9_unofficial/cloudv3.py", line 148, in getMaps
    return list(map(lambda x: CloudMap(self, x), r.json()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/purei9_unofficial/cloudv3.py", line 148, in <lambda>
    return list(map(lambda x: CloudMap(self, x), r.json()))
                              ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/purei9_unofficial/cloudv3.py", line 302, in __init__
    self.zones = list(map(lambda x: CloudZone(self, x), js["zones"]))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

Any suggestions what it could be?

EDIT: To be clear. It worked and then stopped a couple of days ago. Feels like the API might've changed.

@Ekman
Copy link
Contributor Author

Ekman commented Nov 24, 2024

Hm, looks like one of my vacuums added a new map. It should detect the existing one, but it didn't and instead created a new map. The new map contains 0 zones.

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

No branches or pull requests

1 participant