Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

byte indices must be integers or slices, not float #149

Closed
RoSulek1 opened this issue Jul 9, 2021 · 1 comment
Closed

byte indices must be integers or slices, not float #149

RoSulek1 opened this issue Jul 9, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@RoSulek1
Copy link

RoSulek1 commented Jul 9, 2021

Device: vacuum:0000A006:viomi-v13:1
Home Assistant Container, 2021.7.1
Xiaomi Cloud Map Extractor v 2.1.0

config:
- platform: xiaomi_cloud_map_extractor name: VaderEyes host: 192.168.0.xxxxxx token: xxxxxxxxxxxxxx username: xxx@xxx.com password: xxxxxx draw: ['all'] attributes: - calibration_points store_map: true

log:
Update for camera.vadereyes 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 617, in async_device_update await task 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/viomi/vacuum.py", line 15, in decode_map return MapDataParserViomi.parse(unzipped, colors, drawables, texts, sizes, image_config) File "/config/custom_components/xiaomi_cloud_map_extractor/viomi/map_data_parser.py", line 170, in parse map_data.vacuum_room = MapDataParserViomi.get_current_vacuum_room(buf, map_data.vacuum_position) File "/config/custom_components/xiaomi_cloud_map_extractor/viomi/map_data_parser.py", line 189, in get_current_vacuum_room pixel_type = buf.get_at_image(vacuum_position_on_image.y * 800 + vacuum_position_on_image.x) File "/config/custom_components/xiaomi_cloud_map_extractor/viomi/map_data_parser.py", line 30, in get_at_image return self._data[self._image_beginning + offset - 1] TypeError: byte indices must be integers or slices, not float

@PiotrMachowski PiotrMachowski self-assigned this Jul 9, 2021
@PiotrMachowski PiotrMachowski added the bug Something isn't working label Jul 9, 2021
@PiotrMachowski
Copy link
Owner

Fixed in v2.1.1

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

No branches or pull requests

2 participants