WIP Same Encoding Issue made me cry
#1
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:
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 !!
Reply

Logout Mark Read Team Forum Stats Members Help
Same Encoding Issue made me cry0