Unicode error in wx_gdi ?

Erik Bethke erikbethke at gmail.com
Fri Mar 4 03:10:32 EST 2005


Hello All,

I still shaking out my last few bugs in my tile matching game:

I am now down to one stumper for me:
 1) when I initialize wxPython
 2) from an exe that I have created with py2exe
 3) when the executable is located on the desktop as opposed to
somewhere on C or D directly
 4) when My Desktop is not written in ascii but instead Korean hangul

I get this error:

Traceback (most recent call last):
  File "shanghai.py", line 13, in ?
  File "wxPython\__init__.pyc", line 10, in ?
  File "wxPython\_wx.pyc", line 3, in ?
  File "wxPython\_core.pyc", line 15, in ?
  File "wx\__init__.pyc", line 42, in ?
  File "wx\_core.pyc", line 10994, in ?
  File "wx\_gdi.pyc", line 2443, in ?
  File "wx\_gdi.pyc", line 2340, in Locale_AddCatalogLookupPathPrefix
UnicodeDecodeError: 'ascii' codec can't decode byte 0xbf in position
26: ordinal not in range(128)

Granted this may seem like an obscure error, but the net effect is that
I cannot use wxPython for my games and applications as many of my users
will place the executable directly on their desktop and the path of the
desktop contains non-ascii paths.

What do i do from here?  Do I go into wx_gdi.py and fix it so that it
uses unicode instead of ascii?  I have not yet made any changes to
other people's libraries...

Any help would be much appreciated,
-Erik




More information about the Python-list mailing list