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

TypeError: 'NoneType' object is not iterable (Viomi S9) #158

Closed
fokcuk opened this issue Jul 25, 2021 · 3 comments
Closed

TypeError: 'NoneType' object is not iterable (Viomi S9) #158

fokcuk opened this issue Jul 25, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@fokcuk
Copy link

fokcuk commented Jul 25, 2021

After the last HA update (or could be few others - did not check) to 2021.7.4 started to see a lot of these in the logs

Logger: homeassistant.helpers.entity
Source: custom_components/xiaomi_cloud_map_extractor/roidmi/map_data_parser.py:117
Integration: xiaomi_cloud_map_extractor (documentation, issues)
First occurred: 11:36:41 PM (35 occurrences)
Last logged: 11:39:32 PM

Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):

  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 401, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 609, in async_device_update
    raise exc
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 257, in update
    self._handle_map_data(map_name)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 314, in _handle_map_data
    map_data, map_stored = self._device.get_map(map_name, self._colors, self._drawables, self._texts,
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 28, in get_map
    map_data = self.decode_map(response, colors, drawables, texts, sizes, image_config)
  File "/config/custom_components/xiaomi_cloud_map_extractor/roidmi/vacuum.py", line 15, in decode_map
    return MapDataParserRoidmi.parse(unzipped, colors, drawables, texts, sizes, image_config)
  File "/config/custom_components/xiaomi_cloud_map_extractor/roidmi/map_data_parser.py", line 31, in parse
    map_data.rooms = MapDataParserRoidmi.parse_rooms(map_info)
  File "/config/custom_components/xiaomi_cloud_map_extractor/roidmi/map_data_parser.py", line 117, in parse_rooms
    for area in areas:
TypeError: 'NoneType' object is not iterable
@PiotrMachowski PiotrMachowski self-assigned this Aug 2, 2021
@PiotrMachowski PiotrMachowski added the bug Something isn't working label Aug 2, 2021
@r3pek
Copy link

r3pek commented Dec 29, 2021

Any idea what this is? Just got the same problem :(

@PiotrMachowski
Copy link
Owner

Problem should be solved in v2.1.2

@polyphia
Copy link

polyphia commented Sep 14, 2022

I am getting the same issue on Home Assistant 2022.9.4 with latest version 2.2.0

Vacuum Model : Viomi S9

`Logger: homeassistant.helpers.entity
Source: custom_components/xiaomi_cloud_map_extractor/roidmi/map_data_parser.py:129
Integration: xiaomi_cloud_map_extractor ([documentation](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor), [issues](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues))
First occurred: 5:35:28 PM (226 occurrences)
Last logged: 5:54:11 PM

Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
    raise exc
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 278, in update
    self._handle_map_data(map_name)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 335, in _handle_map_data
    map_data, map_stored = self._device.get_map(map_name, self._colors, self._drawables, self._texts,
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 36, in get_map
    map_data = self.decode_map(response, colors, drawables, texts, sizes, image_config)
  File "/config/custom_components/xiaomi_cloud_map_extractor/roidmi/vacuum.py", line 23, in decode_map
    return MapDataParserRoidmi.parse(unzipped, colors, drawables, texts, sizes, image_config)
  File "/config/custom_components/xiaomi_cloud_map_extractor/roidmi/map_data_parser.py", line 32, in parse
    map_data.rooms = MapDataParserRoidmi.parse_rooms(map_info)
  File "/config/custom_components/xiaomi_cloud_map_extractor/roidmi/map_data_parser.py", line 129, in parse_rooms
    for area in areas:
TypeError: 'NoneType' object is not iterable`

@PiotrMachowski any fix ?

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants