Json error accepted while testing simple example
Closed this issue · 7 comments
on python 2.7 while running the example, receive an abend as attached:
(worked fine couple of months ago...)
From: Budapest, Hungary - to: Gyor, Hungary
Traceback (most recent call last):
File "work.py", line 9, in
route.calc_route_info()
File "/usr/local/lib/python2.7/dist-packages/WazeRouteCalculator/WazeRouteCalculator.py", line 133, in calc_route_info
route = self.get_route(1, time_delta)
File "/usr/local/lib/python2.7/dist-packages/WazeRouteCalculator/WazeRouteCalculator.py", line 92, in get_route
response_json = response.json()
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 850, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python2.7/dist-packages/simplejson/init.py", line 516, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 374, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 404, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Hi @welderwelder ,
can you please print your WRC version?
Maybe this is duplicate of #21
import WazeRouteCalculator
print(WazeRouteCalculator.__version__)
i'm exactly looking at it..
made next:
root@tali(12:17,90%):/acmeinc/swirun# pip install WazeRouteCalculator/acmeinc/swirun# python
Requirement already satisfied: WazeRouteCalculator in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: requests in /usr/lib/python2.7/dist-packages (from WazeRouteCalculator)
root@tali(13:00,100%):
Python 2.7.13 (default, Dec 18 2016, 20:19:42)
[GCC 6.2.1 20161215] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import WazeRouteCalculator
print(WazeRouteCalculator.version)
0.5
Thanks!
Can you please update WazeRouteCalculator to version 0.6?
by doing pip uninstall + pip install ? (because i made pip install once again and it notifies that the requirements already satisfied)
pip install -U
just made unistall+install. works fine.
it seems a nice idea to write down as an upgrade instruction to perform unistall+install
(maybe it's just my newbie lack of knowledge...)
thanks a lot for your help :}
cheers ;)