[Twisted-Python] print unicode

Itamar Turner-Trauring itamar at itamarst.org
Wed May 5 08:54:22 MDT 2010


On Wed, 2010-05-05 at 16:47 +0200, Pet wrote:
> Now, I'm getting Exception with
> 
>           File "/usr/local/tw10/lib/python2.5/site-packages/Twisted-10.0.0-py2.5-linux-x86_64.egg/twisted/python/log.py",
> line 555, in write
>             d = (self.buf + data).split('\n')
>         exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte
> 0xc5 in position 4: ordinal not in range(128)

Are you logging/printing unencoded unicode strings (i.e. type(s) ==
unicode)? Twisted does not support that.





More information about the Twisted-Python mailing list