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

ValueError #21

Closed
0k4 opened this issue Sep 10, 2018 · 2 comments
Closed

ValueError #21

0k4 opened this issue Sep 10, 2018 · 2 comments

Comments

@0k4
Copy link

0k4 commented Sep 10, 2018

Hey,

Thanks a lot for the API, been using it off and on for a while. Wanted to use it this week and saw this error trace getting thrown with the simple scripts I've written. (Tbh it's your quickstart script with changed hardcoded locations nothing big really)
And I've been getting this:

PS C:\Users\X\Github\WazeRouteCalculator> python .\NamurHome.py
From: Namur - to: Lokeren, België
Traceback (most recent call last):
  File ".\NamurHome.py", line 9, in <module>
    route.calc_route_info()
  File "C:\Users\X\Github\WazeRouteCalculator\WazeRouteCalculator\WazeRouteCalculator.py", line 133, in calc_route_info
    route = self.get_route(1, time_delta)
  File "C:\Users\X\Github\WazeRouteCalculator\WazeRouteCalculator\WazeRouteCalculator.py", line 92, in get_route
    response_json = response.json()
  File "C:\Python34\lib\site-packages\requests\models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Python34\lib\json\__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "C:\Python34\lib\json\decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Python34\lib\json\decoder.py", line 361, in raw_decode
    raise ValueError(errmsg("Expecting value", s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

Am I missing something obvious here?

Kind Regards,

@kovacsbalu
Copy link
Owner

Hi @BonoVanderpoorten,
can you please print your WRC version?

import WazeRouteCalculator
print(WazeRouteCalculator.__version__)

@0k4
Copy link
Author

0k4 commented Sep 10, 2018

Hey @kovacsbalu

This is kinda weird, since I ran pip install WazeRouteCalculator and it showed version 0.6 got installed so I thought I was updated. I'll figure out how to update, sorry for the fake issue!

Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import WazeRouteCalculator
>>> print(WazeRouteCalculator.__version__)
0.5

Edit:
My packages were updated correctly by pip, but I ran my scripts from the same folder as I pulled this repo from months back, which still had the 0.5 (Woops). After moving my scripts elsewhere, they picked up the newest version from pip and they all worked again. Thanks for hinting me in the direction of the version! ;)

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

2 participants