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

downloading the recovery map file fails (500) (v. 2.0.b014) #502

Closed
gibman opened this issue Apr 21, 2024 · 2 comments
Closed

downloading the recovery map file fails (500) (v. 2.0.b014) #502

gibman opened this issue Apr 21, 2024 · 2 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@gibman
Copy link

gibman commented Apr 21, 2024

Describe the bug
When I try and download any of the reported URLs for recovery maps then I receive an error (500 internal).
Any of the urls presented in the camera entity do not work.
http://192.168.1.x:yyyy/api/camera_recovery_map_proxy/camera.stueplan_map_1?token=SNIP&index=1&v=SNIP&file=1

If I use the same querystring except for file=1, then I get an nice image of the map itself.
eg.
http://192.168.1.x:yyyy/api/camera_recovery_map_proxy/camera.stueplan_map_1?token=SNIP&index=1&v=SNIP
so this part works fine.

To Reproduce
Steps to reproduce the behavior.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional Information (please complete the following information)

  • Model Name [e.g. dreame.vacuum.p2028]: Dreame l10s ultra
  • Firmware Version [e.g. 1156]: 4.3.9_3204
  • Home Assistant Version: core 2024.4.3
    running vers. 2.0.0b14 of the dreame integration:
  • Configuration Type [With or without map support]:
  • Errors or warnings shown in the HA logs (if applicable):
    2024-04-21 22:20:36.110 INFO (SyncWorker_10) [custom_components.dreame_vacuum.dreame.map] Recovery map object name: ali_dreame/DL791664/123456789/100 2024-04-21 22:20:36.111 INFO (SyncWorker_10) [custom_components.dreame_vacuum.dreame.map] Recovery map file url: ali_dreame/DL791664/123456789/100 = https://dreame-eu.oss-eu-central-1.aliyuncs.com/iot/tmp/000000/ali_dreame/DL791664/123456789/100?Expires=1713732264&OSSAccessKeyId=ATLI5t96WkBXXNzQrX4HtQti&Signature=196MKxLLDV%2B0gWyvy5irzBVvXD9%3D&current=1234512345 2024-04-21 22:20:36.437 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 823, in get return await self.handle(request, camera) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/camera.py", line 255, in handle body=gzip.compress(bytes(result, "utf-8")) if data and not file else result, ^^^^ UnboundLocalError: cannot access local variable 'data' where it is not associated with a value
@gibman gibman added bug Something isn't working question Further information is requested labels Apr 21, 2024
@Tasshack
Copy link
Owner

Should be working on v2.0.0b13 and will be fixed on v2.0.0b15.

Repository owner deleted a comment from RykovDC Apr 22, 2024
Repository owner deleted a comment from RykovDC Apr 22, 2024
@Tasshack
Copy link
Owner

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

No branches or pull requests

2 participants