-
Notifications
You must be signed in to change notification settings - Fork 24
UnicodeEncodeError #26
Comments
Hi Jamie, I would highly appreciate your reply as I really like your addon and your effort. here the log: |
This problem is caused by an incorrect handling of the downloaded JSON files. Mubi is now probaly sending emojis or country flags and this is revealing the issue. To correct this try to change json.loads(r.text)['country'] to
If this works one should sprinkle |
Thanks for the suggestion. Unfortunately adding .encode("utf-8") as shown doesn't stop the exception and the same error as before is logged. Also tried adding .encode to some other json.loads statements without success. |
I've the same exact problem, did you solved it perhaps? |
Jamie, Thanks for this great plugin I've been using it for a few weeks without any problems however something seems to have changed recently (possibly at the MUBI end?) as I am unable to access it anymore.
I've copied the error logs from Kodi below - maybe they can help clarify whether the issue relates to my installation or something else...
Please let me know if I can provide further detail.
Cheers,
David
22:30:53.414 T:3304059808 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeEncodeError'>
Error Contents: 'ascii' codec can't encode character u'\u2019' in position 96: ordinal not in range(128)
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.mubi/addon.py", line 12, in
mubi = Mubi(plugin.get_setting("username", unicode), plugin.get_setting("password", unicode))
File "/storage/.kodi/addons/plugin.video.mubi/resources/lib/mubi.py", line 42, in init
self.login()
File "/storage/.kodi/addons/plugin.video.mubi/resources/lib/mubi.py", line 55, in login
self.app_startup()
File "/storage/.kodi/addons/plugin.video.mubi/resources/lib/mubi.py", line 66, in app_startup
xbmc.log("Failed to get country: %s" % r.text, 4)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 96: ordinal not in range(128)
-->End of Python script error report<--
The text was updated successfully, but these errors were encountered: