calmjm / tojota

Functions for interacting with Toyota MyT API
Apache License 2.0
73 stars 15 forks source link

IndexError: list index out of range #13

Closed moseisleydk closed 3 years ago

moseisleydk commented 3 years ago

Hi,

Great work - but Im getting:

(tojota) ╭─bnp@sparrow ~/tojota ‹master› ╰─$ python tojota.py 2020-11-08 18:31:32,757:main:INFO: Logging in... 2020-11-08 18:31:33,496:main:INFO: Fetching trips... Traceback (most recent call last): File "tojota.py", line 419, in sys.exit(main()) File "tojota.py", line 342, in main latest_address = trips['recentTrips'][0]['endAddress'] IndexError: list index out of range (tojota) ╭─bnp@sparrow ~/tojota ‹master› ╰─$

calmjm commented 3 years ago

Code didn't expect that there are no trips. Exception fixed in https://github.com/calmjm/tojota/pull/14 .