flobz / psa_car_controller

Control psa car with connected_car v4 API.
GNU General Public License v3.0
415 stars 220 forks source link

Rate Limit Exception #859

Closed Reddax closed 4 months ago

Reddax commented 5 months ago

Describe the bug When trying to refresh the car data, I hit a RateLimitException in the log, and doesn't refresh the car. But directly going onto the vauxhall app and refreshing works.

To Reproduce Steps to reproduce the behavior:

  1. logon to the Psa_car_controller interface.
  2. Go to the Control Tab
  3. Hit refresh
  4. Check the logs

Environment (please complete the following information):

Log:

2024-04-19 22:08:47,112 :: ERROR :: Exception on /_dash-update-component [POST]
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.9/dist-packages/dash/dash.py", line 1352, in dispatch
ctx.run(
File "/usr/local/lib/python3.9/dist-packages/dash/_callback.py", line 450, in add_context
output_value = _invoke_callback(func, *func_args, **func_kwargs)
File "/usr/local/lib/python3.9/dist-packages/dash/_callback.py", line 39, in _invoke_callback
return func(*args, **kwargs) # %% callback invoked %%
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/tools/Button.py", line 42, in call
self._fct(self._element_id)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
raise RateLimitException
psa_car_controller.common.utils.RateLimitException
2024-04-19 22:08:47,112 :: ERROR :: Exception on /_dash-update-component [POST]
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.9/dist-packages/dash/dash.py", line 1352, in dispatch
ctx.run(
File "/usr/local/lib/python3.9/dist-packages/dash/_callback.py", line 450, in add_context
output_value = _invoke_callback(func, *func_args, **func_kwargs)
File "/usr/local/lib/python3.9/dist-packages/dash/_callback.py", line 39, in _invoke_callback
return func(*args, **kwargs) # %% callback invoked %%
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/tools/Button.py", line 42, in call
self._fct(self._element_id)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
raise RateLimitException
psa_car_controller.common.utils.RateLimitException
vineethktpla commented 5 months ago

Already opened https://github.com/flobz/psa_car_controller/issues/851#issue-2243113061