[Twisted-Python] Failure.getTraceback and Unicode

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Mon Aug 26 10:43:11 MDT 2013


On 04:24 pm, tobias.oberstein at tavendo.de wrote:
>Hi,
>
>The code for "getTraceback"
>
>http://twistedmatrix.com/trac/browser/tags/releases/twisted-13.1.0/twisted/python/failure.py#L529
>
>uses a native version of StringIO
>
>http://twistedmatrix.com/trac/browser/tags/releases/twisted-13.1.0/twisted/python/failure.py#L23
>
>However, cStringIO:

`NativeStringIO` doesn't mean `cStringIO`.  On Python 2, it means 
`io.BytesIO` - which, as you observed, does not support unicode. :)
>
>Should I file a bug?

It seems unfortunate that trying to report an exception will fail 
because of encoding issues.  That seems like a bug worth fixing to me.

Jean-Paul



More information about the Twisted-Python mailing list