tuya_cloud_map_extractor icon indicating copy to clipboard operation
tuya_cloud_map_extractor copied to clipboard

[BUG] - list index out of range

Open paulka007 opened this issue 5 months ago • 4 comments

After completing all the install steps, I try to add the integration but get the error "An unknown error occured. See logs for details." The Tuya & localtuya integration are both installed. I did disable the vac in the localtuya for trobuleshooting. It does appear in the tuya integration as a vacuum and can be triggered from HA. The vacuum is setup in the android Tuya Smart app, with partitions labeled/named, also created overlapping areas. Sweeping Robot Open Service is enabled.

I'm not sure if this is related to #8

To Reproduce Adding the integration with all appropriate IDs.

Version:

  • HA Docker: 2024.3.1
  • Robot: Proscenic M9
  • Map extractor v1.2.1

Log entry After enabling debug logging in tuya, the two errors are below:

image

This error originated from a custom integration.

Logger: custom_components.tuya_cloud_map_extractor.config_flow
Source: custom_components/tuya_cloud_map_extractor/config_flow.py:57
integration: Tuya Cloud Map Extractor (documentation, issues)
First occurred: 11:18:43 AM (3 occurrences)
Last logged: 11:32:55 AM

list index out of range
Traceback (most recent call last):
  File "/config/custom_components/tuya_cloud_map_extractor/config_flow.py", line 57, in async_step_user
    headers, image = await validate(self.hass, user_input)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tuya_cloud_map_extractor/config_flow.py", line 214, in validate
    return await hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/tuya_cloud_map_extractor/tuya_vacuum_map_extractor/main.py", line 131, in get_map
    raise e
  File "/config/custom_components/tuya_cloud_map_extractor/tuya_vacuum_map_extractor/main.py", line 127, in get_map
    map_link = link["result"][0]["map_url"]
               ~~~~~~~~~~~~~~^^^
IndexError: list index out of range

image

This error originated from a custom integration.

Logger: custom_components.tuya_cloud_map_extractor.tuya_vacuum_map_extractor.main
Source: custom_components/tuya_cloud_map_extractor/tuya_vacuum_map_extractor/main.py:130
integration: Tuya Cloud Map Extractor (documentation, issues)
First occurred: 11:18:43 AM (4 occurrences)
Last logged: 11:37:10 AM

Encountered an error, please include the following data in your github issue: b'eyJyZXN1bHQiOiBbXSwgInN1Y2Nlc3MiOiB0cnVlLCAidCI6IDE3MTE0NDQ3MjM1NjIsICJ0aWQiOiAiZDc3YzkzYTVlYjUxMTFlZTkxYzAzMjIxZGQ4NDFkOWMifQ=='
Encountered an error, please include the following data in your github issue: b'eyJyZXN1bHQiOiBbXSwgInN1Y2Nlc3MiOiB0cnVlLCAidCI6IDE3MTE0NDU1MjYzODQsICJ0aWQiOiAiYjVmYjhjMmFlYjUzMTFlZTljNjdkMjk2Y2NmNWMwOTEifQ=='
Encountered an error, please include the following data in your github issue: b'eyJyZXN1bHQiOiBbXSwgInN1Y2Nlc3MiOiB0cnVlLCAidCI6IDE3MTE0NDU1NzUxMjcsICJ0aWQiOiAiZDMwZTRjNGNlYjUzMTFlZTkyYWU0NjMwNTdmZTlhMmUifQ=='
Encountered an error, please include the following data in your github issue: b'eyJyZXN1bHQiOiBbXSwgInN1Y2Nlc3MiOiB0cnVlLCAidCI6IDE3MTE0NDU4MzAyMjcsICJ0aWQiOiAiNmIxOTE0MTNlYjU0MTFlZTg0Y2I1MmVkYzJhMWI0YTMifQ=='

Thank you :-)

paulka007 avatar Mar 26 '24 09:03 paulka007