[wxPython-users] ANN: GUI2Exe for wxPython :-D

Robin Dunn robin at alldunn.com
Mon Apr 2 11:30:19 PDT 2007


Andrea Gavana wrote:

>>     d.open(file, db.DB_BTREE, flags, mode)
>> UnicodeEncodeError: 'ascii' codec can't encode characters in position 
>> 26-29:
>> ord
>> inal not in range(128)
>>
>> My default system encoding is hebrew, must be something in bsddb's 
>> unicode
>> support.
> 
> I have no idea about that... surely Robin knows the answer, he has
> developed bsddb for quite long time... but maybe is just my fault, I
> never worked with bsddb before :-D

It's expecting a string.  When you pass a unicode object to it then 
Python tries to coerce it to a string, using the default codec.  You 
should do the conversion yourself (probably to the 
sys.getfilesystemencoding() encoding) before calling open.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list