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

Handle timeout exception by displaying it nicely to the user #35

Open
eras opened this issue Dec 1, 2023 · 0 comments
Open

Handle timeout exception by displaying it nicely to the user #35

eras opened this issue Dec 1, 2023 · 0 comments

Comments

@eras
Copy link
Owner

eras commented Dec 1, 2023

  File "/usr/local/lib/python3.9/dist-packages/teslabot/tesla.py", line 770, in _command_on_vehicle
    result = await self._retry_to_async(call)
  File "/usr/local/lib/python3.9/dist-packages/teslabot/tesla.py", line 756, in _retry_to_async
    return await self._retry(call)
  File "/usr/local/lib/python3.9/dist-packages/teslabot/tesla.py", line 722, in _retry
    result = await fn()
  File "/usr/local/lib/python3.9/dist-packages/teslabot/tesla.py", line 755, in call
    return await to_async(call2)
  File "/usr/local/lib/python3.9/dist-packages/teslabot/asyncthread.py", line 26, in to_async
    raise value_or_exn
  File "/usr/local/lib/python3.9/dist-packages/teslabot/asyncthread.py", line 16, in call_it
    return Value(fn())
  File "/usr/local/lib/python3.9/dist-packages/teslabot/tesla.py", line 754, in call2
    return fn()
  File "/usr/local/lib/python3.9/dist-packages/teslabot/tesla.py", line 769, in call
    return fn(vehicle)
  File "/usr/local/lib/python3.9/dist-packages/teslabot/tesla.py", line 703, in call
    return vehicle.command(command, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/teslapy/__init__.py", line 674, in command
    response = self.api(name, **kwargs).get('response')
  File "/usr/local/lib/python3.9/dist-packages/teslapy/__init__.py", line 482, in api
    return self.tesla.api(name, {'vehicle_id': self['id_s']}, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/teslapy/__init__.py", line 363, in api
    return self.request(endpoint['TYPE'], uri, serialize,
  File "/usr/local/lib/python3.9/dist-packages/teslapy/__init__.py", line 155, in request
    response.raise_for_status()  # Raise HTTPError, if one occurred
  File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 408 Client Error: {"error": "timeout"} for url: https://owner-api.teslamotors.com/api/1/vehicles/.../command/charge_start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant