CJNE / pyporscheconnectapi

Python client library for Porsche Connect API
MIT License
44 stars 9 forks source link

AttributeError: 'Namespace' object has no attribute 'vin' #16

Closed jumban closed 1 year ago

jumban commented 1 year ago

Hi, thanks for this wonderful library.

I tried to run with the following:

./cli.py

After entering email and password, I immediately get shown this error.

Traceback (most recent call last):
  File "/Users/jeff/Projects/pyporscheconnectapi/./cli.py", line 4, in <module>
    cli()
  File "/Users/jeff/Projects/pyporscheconnectapi/pyporscheconnectapi/cli.py", line 268, in cli
    loop.run_until_complete(main(args))
  File "/Users/jeff/.pyenv/versions/3.9.13/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/Users/jeff/Projects/pyporscheconnectapi/pyporscheconnectapi/cli.py", line 52, in main
    if args.vin is not None:
AttributeError: 'Namespace' object has no attribute 'vin'
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x101db7340>

Could be please advise on what I could be doing wrong? Any help will be greatly appreciated.

fredriklj commented 1 year ago

To run the cli in interactive mode is deprecation and should be removed. Please try the command line arguments. For example:

porschecli -e [e-mail] -p [password] overview

The command line argument --help will give you an overview of the options.

jumban commented 1 year ago

Thank you for your help, using the CLI commands directly with pyporschecli worked.

Closing the issue.