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

API changed (yesterday) #22

Closed
jochenpee opened this issue Oct 10, 2021 · 5 comments
Closed

API changed (yesterday) #22

jochenpee opened this issue Oct 10, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@jochenpee
Copy link

I do not get data anymore, the Android app needs an update, so I guess API has changed.

@tillsteinbach
Copy link
Owner

Hmmm, that is strange, I don't have any issues right now. Do you have any logfiles showing the problem? You can increase verbosity with -vvv

@tillsteinbach tillsteinbach self-assigned this Oct 10, 2021
@jochenpee
Copy link
Author

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login.apps.emea.vwapps.io:443
DEBUG:urllib3.connectionpool:https://login.apps.emea.vwapps.io:443 "GET /refresh/v1 HTTP/1.1" 200 3833
INFO:weconnect:Token refreshed
Traceback (most recent call last):
File "/usr/local/bin/wc-cli", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/weconnect_cli/weconnect_cli.py", line 157, in main
weConnect.fillCacheFromJson(args.cachefile, maxAge=args.interval, maxAgePictures=args.pictureCache)
File "/usr/local/lib/python3.8/site-packages/weconnect/weconnect.py", line 241, in fillCacheFromJson
self.__cache = json.load(file)
File "/usr/local/lib/python3.8/json/init.py", line 293, in load
return loads(fp.read(),
File "/usr/local/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 671877 (char 671876)

That is what I get with -vvv.

@tillsteinbach
Copy link
Owner

Somehow your cache became corrupted. This is easy to fix, you just delete the cache file. I will implement that the cache will be deleted in this case.
Thank you for reporting this issue!

@tillsteinbach tillsteinbach added the bug Something isn't working label Oct 10, 2021
@jochenpee
Copy link
Author

Thanks, that worked!
Great tool!

@tillsteinbach
Copy link
Owner

Fixed in 0.15.1.
The cache is now deleted automatically if corrupted. A message should still be shown to inform the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants