tuya_cloud_map_extractor icon indicating copy to clipboard operation
tuya_cloud_map_extractor copied to clipboard

[BUG] - Map format not supported

Open CodeFatherG opened this issue 8 months ago • 13 comments

Describe the bug The bug seems to be that there is no map available when show path or show location is set. Disabling both of these options causes the map to load, but doesn't show me the cleaning path or the location (important to knowing the robot state in my opinion). Device is a Lubluelu SL60D which is marked as supported

To Reproduce Steps to reproduce the behavior:

  1. I added the Sweeping Robot Open Service to my cloud project
  2. Configured this tool with the config flow

Version: Core 2023.12.3 Supervisor 2023.12.0 Operating System 11.2 Frontend 20231208.2

Log entry

2023-12-21 11:57:53.537 ERROR (MainThread) [custom_components.tuya_cloud_map_extractor.config_flow] not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/simplejson/__init__.py", line 514, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/simplejson/decoder.py", line 386, in decode
obj, end = self.raw_decode(s)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/simplejson/decoder.py", line 416, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/tuya_cloud_map_extractor/tuya_vacuum_map_extractor/main.py", line 47, in parse_path
data = response.json()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
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.11/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 188, in get_map
path = parse_path(response, scale=scale, header=header)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tuya_cloud_map_extractor/tuya_vacuum_map_extractor/main.py", line 51, in parse_path
path_data = decode_path_v1(data)
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tuya_cloud_map_extractor/tuya_vacuum_map_extractor/v1.py", line 111, in decode_path_v1
x, y = [_deal_pl(_highLowToInt(high, low)) for high, low in _partition(point, 2)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tuya_cloud_map_extractor/tuya_vacuum_map_extractor/v1.py", line 111, in <listcomp>
x, y = [_deal_pl(_highLowToInt(high, low)) for high, low in _partition(point, 2)]
^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
2023-12-21 11:58:58.851 WARNING (SyncWorker_8) [custom_components.tuya_cloud_map_extractor.camera] Unable to parse map data
2023-12-21 11:58:58.852 ERROR (SyncWorker_8) [custom_components.tuya_cloud_map_extractor.camera] not enough values to unpack (expected 2, got 1)
2023-12-21 12:01:15.617 WARNING (SyncWorker_4) [custom_components.tuya_cloud_map_extractor.camera] Unable to parse map data
2023-12-21 12:01:15.618 ERROR (SyncWorker_4) [custom_components.tuya_cloud_map_extractor.camera] not enough values to unpack (expected 2, got 1)

CodeFatherG avatar Dec 21 '23 02:12 CodeFatherG