Index Error on Image_Draw.py
Closed this issue ยท 4 comments
`Update for camera.fuffy_camera fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 950, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1293, in async_device_update
await self.async_update()
File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 425, in async_update
pil_img = await self.hass.async_create_task(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/valetudo_vacuum_camera/camera_processing.py", line 191, in run_async_process_valetudo_data
images = await gather(*tasks)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/valetudo_vacuum_camera/camera_processing.py", line 169, in process_valetudo_data
result = loop.run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/config/custom_components/valetudo_vacuum_camera/camera_processing.py", line 48, in async_process_valetudo_data
pil_img = await self._map_handler.async_get_image_from_json(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/valetudo_vacuum_camera/valetudo/hypfer/image_handler.py", line 268, in async_get_image_from_json
room_id, img_np_array = await self.imd.async_draw_base_layer(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/valetudo_vacuum_camera/valetudo/hypfer/image_draw.py", line 68, in async_draw_base_layer
and self.img_h.active_zones[room_id + 1] == 1
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
IndexError: list index out of range
`
Mine too, is enough this log?
Originally posted by @brusarp in #140 (comment)
@andrejpavlovic and @benbender root cause found and fix release scheduled at soon I complete some test on 2024.05.3. There are a couple of other bug fixes that will go out then. As soon I'm done will comment again on it.
@sca075 Thank you! Very much appreciated! <3
PS: If you want to, you could release a dev-version to let us confirm the fix. The dev-version could be directly installed via HACS.
Thank you! Works for me ๐