[Twisted-Python] Failure.getTraceback and Unicode

Tobias Oberstein tobias.oberstein at tavendo.de
Mon Aug 26 10:24:16 MDT 2013


The code for "getTraceback"


uses a native version of StringIO


However, cStringIO:

"Unlike the StringIO<http://docs.python.org/2/library/stringio.html#module-StringIO> module, this module is not able to accept Unicode strings that cannot be encoded as plain ASCII strings."

Above situation triggers an exception when the traceback includes non-ASCII Unicode strings:

'unicode' does not have the buffer interface

I have worked around this by implementing my own "getTraceback" that uses standard (non-native) StringIO. Works.

Should I file a bug?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20130826/f5ac6cdd/attachment.html>

More information about the Twisted-Python mailing list