2014-03-04, 21:47
I have this URL. It's JSON parse well on Python2.7 and 3.x but within XBMC it cries out loud and throws following error:
Following is my Code:
The same code parse data well if I write a normal Python script but not XBMC Frodo 13 based Python Engine. Please help me !!
Code:
EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'simplejson.scanner.JSONDecodeError'>
Error Contents: Expecting ',' delimiter or '}': line 1 column 4292 (char 4291)
Traceback (most recent call last):
File "/Users/xx/Library/Application Support/XBMC/addons/plugin.video.xx-com/default.py", line 293, in <module>
loadYoutube()
File "/Users/xx/Library/Application Support/XBMC/addons/plugin.video.xx-com/default.py", line 114, in loadYoutube
jsonContent = json.loads(content)
Following is my Code:
Code:
import simplejson as json
response = urllib2.urlopen(url)
jsonContent = json.loads(content)
print(jsonContent)
The same code parse data well if I write a normal Python script but not XBMC Frodo 13 based Python Engine. Please help me !!