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

Integration startup fails for landxcape because of missing timezone information in warranty.py #68

Closed
rasmuspeders1 opened this issue Jul 20, 2022 · 1 comment · Fixed by #69
Labels
bug Something isn't working done Issue have been resolved and a fix have been merged into the code or will be on next release

Comments

@rasmuspeders1
Copy link

Environment:

  • Home Assistant version: 2022.7.5
  • Landroid_cloud version: 2.2.2
  • Operation system: docker

Configuration

Configured for Landxcape through GUI

Describe the bug

During initialization an unhandled exception occurs in pyworxcloud.utils.warranty because the data input argument has None for the timezone.

Debug log

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 353, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/landroid_cloud/__init__.py", line 66, in async_setup_entry
    result = await _async_setup(hass, entry)
  File "/config/custom_components/landroid_cloud/__init__.py", line 208, in _async_setup
    await hass.async_add_executor_job(cloud.connect, False, False)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/pyworxcloud/__init__.py", line 226, in connect
    self._fetch()
  File "/usr/local/lib/python3.10/site-packages/pyworxcloud/__init__.py", line 638, in _fetch
    device = DeviceHandler(self._api, product)
  File "/usr/local/lib/python3.10/site-packages/pyworxcloud/utils/devices.py", line 37, in __init__
    self.__mapinfo(api, product)
  File "/usr/local/lib/python3.10/site-packages/pyworxcloud/utils/devices.py", line 90, in __mapinfo
    self.warranty = Warranty(data)
  File "/usr/local/lib/python3.10/site-packages/pyworxcloud/utils/warranty.py", line 27, in __init__
    < datetime.now().astimezone(pytz.timezone(data["time_zone"]))
  File "/usr/local/lib/python3.10/site-packages/pytz/__init__.py", line 168, in timezone
    raise UnknownTimeZoneError(None)
pytz.exceptions.UnknownTimeZoneError: None
@MTrab MTrab added the under investigation This issue is being investigated, to determine the cause label Jul 20, 2022
@MTrab
Copy link
Owner

MTrab commented Jul 20, 2022

I'll move this to pyworxcloud, as this error is related to the API interface rather than the integration.

@MTrab MTrab transferred this issue from MTrab/landroid_cloud Jul 20, 2022
@MTrab MTrab added bug Something isn't working in progress This issue is currently being worked on and removed under investigation This issue is being investigated, to determine the cause labels Jul 20, 2022
@MTrab MTrab added done Issue have been resolved and a fix have been merged into the code or will be on next release and removed in progress This issue is currently being worked on labels Jul 20, 2022
@MTrab MTrab closed this as completed in #69 Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Issue have been resolved and a fix have been merged into the code or will be on next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants