[issue2517] Error when printing an exception containing a Unicode string
report at bugs.python.org
Tue Apr 1 08:41:09 CEST 2008
Antoine Pitrou <pitrou at free.fr> added the comment:
Shouldn't it be an exception rather than a warning? The fact that an
exception can be downgraded to a warning (and thus involuntarily
silenced) is a bit disturbing IMHO.
Another possibility would be to display the warning, and *then* to
encode the exception message again in "replace" or "ignore" mode rather
than "strict" mode. That way exception messages are always displayed,
but not always properly. The ASCII part of the message is generally
useful, since it gives the exception name and most often the reason too.
Tracker <report at bugs.python.org>
More information about the Python-bugs-list