Kodi Community Forum
python's non-ascii error when importing library - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: python's non-ascii error when importing library (/showthread.php?tid=136280)



python's non-ascii error when importing library - MrOzio - 2012-07-16

Hi guys,

I'm writing an add-on, so far successfully. When I add the following line it runs well on windows, but fails on mac:

from xml.dom.minidom import parseString

SyntaxError: ("Non-ASCII character '\\xac' in file /Users/Shared/xbmc-depends/macosx10.6_i386/lib/python2.6/xml/__init__.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details", ('/Users/Shared/xbmc-depends/macosx10.6_i386/lib/python2.6/xml/__init__.py', 1, 0, None))
00:08:03 T:2962513920 INFO: -->End of Python script error report<--

What am i doing wrong? any help would be appreciated.

Gal.


RE: python's non-ascii error when importing library - MrOzio - 2012-07-18

Dunno what's wrong there, but for now I rewritten my code to use simplejson instead... Tongue