Caching of invalid JSON
Issue #33
resolved
Traceback (most recent call last):
File "./grabber.py", line 61, in <module>
main()
File "./grabber.py", line 41, in main
for n in node.get_children():
File "/home/peter/Code/webdl/webdl/common.py", line 50, in get_children
self.fill_children()
File "/home/peter/Code/webdl/webdl/sbs.py", line 65, in fill_children
for category_path, entry_data in category_and_entry_data:
File "/home/peter/Code/webdl/webdl/sbs.py", line 83, in explode_videos_to_unique_categories
for entry_data in all_video_entries:
File "/home/peter/Code/webdl/webdl/sbs.py", line 74, in load_all_video_entries
data = grab_json(url, 3600)
File "/home/peter/Code/webdl/webdl/common.py", line 165, in grab_json
doc = json.loads(text)
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting object: line 1 column 196608 (char 196607)
I saved the json file and tried some online validators and they're all saying the same sort of error:
The JSON input is NOT valid according to RFC 4627 (JSON specification). Unexpected End Of File position 196607: EOF
Not sure if webdl should be coded to handle crappy json, but if it gets it working again...perhaps it's useful.
Maybe we can just wait and see if sbs fixes it.
Also, the same bad json seems to work just fine on my Sony Bravia tv.
Comments (3)
-
reporter -
repo owner -
assigned issue to
- changed title to Caching of invalid JSON
Probably you had some incomplete JSON cached. WebDL could detect this and refetch fresh data.
-
assigned issue to
-
repo owner - changed status to resolved
- Log in to comment
Works on OSX.
Will check linux again later to see if it was just a problem at the other end that is now resolved.