On 7 mar, 02:29, Michael Bayer <[EMAIL PROTECTED]> wrote: > logging module itself throws UnicodeDecodeError ? yes, in logging.format: ... = "%s" % msg with msg the exception message encoded in utf8 and the default encoding is ascii.
> are you sending exception messages using logging.debug() or similar ? exactly: log.error("... : %s", e.message) my impression > is that you'd want to decode those manually doing something like > string.decode('utf-8'). yes, it works fine, but it's pain to do this in each try/except. Another solution is setting utf8 as the default encoding in sitecustomize.py. It's better centralized, but has sitepackage effect. But a better way IMHO is that the DB driver or SA returns unicode exception message. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---