[issue1284496] traceback module can return undecodable byte strings

Amaury Forgeot d'Arc report at bugs.python.org
Wed Jul 1 16:17:17 CEST 2009


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

Python 3.0 switched to unicode precisely for this kind of issues.
There, you get
'Traceback (most recent call last):\n  File "<stdin>", line 3, in
<module>\nValueError: Invalid value
b\'\\xff\\xfeh\\x00e\\x00l\\x00l\\x00o\\x00\'\n'

For python 2.x, it's up to the application to decide how it will convert
various tracebacks to unicode. The 'backslashreplace' encoding may help,
or you can use %r instead of %s.

----------
nosy: +amaury.forgeotdarc
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1284496>
_______________________________________


More information about the Python-bugs-list mailing list