Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#56 Unicode handling in the "Add" dialog

Severe bug
interface (14)
Aurelien Bompard

When I add characters outside the latin-1 range,
pybliographic's add window seem to freeze. In the
console output, I get a traceback with "NameError:
global name 'UnicodeEncodeError' is not defined"

The name of the exception for Unicode errors is
"UnicodeError", not "UnicodeEncodeError", for python >=
2.3 :
>>> str(u"יאח")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
UnicodeError: ASCII encoding error: ordinal not in

Changing the two occurences of UnicodeEncodeError into
UnicodeError in Pyblio/GnomeUI/ fixed the
problem: a window pops up to tell me the mistake, and
the interface is not frozen. A quick grep in the
sources shows no other occurences of
UnicodeEncodeError, so I think that's all for this bug.

On this page:
one can read:
exception UnicodeEncodeError
Raised when a Unicode-related error occurs during
encoding. It is a subclass of UnicodeError. New in
version 2.3.

Please change UnicodeEncodeError into UnicodeError to
be compatible with python <= 2.3


    • assigned_to: nobody --> gobry
    • status: open --> closed-fixed
  • Logged In: YES

    Thanks for the report. Fixed in arch, patch-111