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

Using renault-api CLI first time while the rate limit is in progress leads to a failure #765

Open
mathieucarbou opened this issue Jan 7, 2023 · 0 comments

Comments

@mathieucarbou
Copy link
Contributor

> renault-api --log status  

Please select account [1]: 1
Do you want to save the account ID to the credential store? [y/N]: y

    Vin    Registration    Brand    Model
--  -----  --------------  -------  -------

Please select vehicle: 
    Vin    Registration    Brand    Model
--  -----  --------------  -------  -------

Please select vehicle: ^CAborted!

> renault-api --log status
    Vin    Registration    Brand    Model
--  -----  --------------  -------  -------

Please select vehicle: ^CAborted!

> renault-api vehicles    
Traceback (most recent call last):
  File "/opt/homebrew/bin/renault-api", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/renault_api/cli/helpers.py", line 39, in wrapper
    asyncio.run(run_command(func, *args, **kwargs))
  File "/opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/opt/homebrew/lib/python3.10/site-packages/renault_api/cli/helpers.py", line 30, in run_command
    await func(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/renault_api/cli/__main__.py", line 190, in vehicles
    await renault_account.display_vehicles(websession, ctx_data)
  File "/opt/homebrew/lib/python3.10/site-packages/renault_api/cli/renault_account.py", line 114, in display_vehicles
    vehicles = [
  File "/opt/homebrew/lib/python3.10/site-packages/renault_api/cli/renault_account.py", line 116, in <listcomp>
    vehicle.raw_data["vehicleDetails"]["registrationNumber"],
KeyError: 'vehicleDetails'

Maybe the rate limit error is not handled by the response handler here ?

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