[Twisted-Python] Twisted logger changes

Maciej Wasilak wasilak at gmail.com
Mon Jun 8 10:51:33 MDT 2015


Dear list,

I've tried running Twisted 15.2.1 with my old library, and I am
getting an exception, that I haven't seen before (with Twisted
14.0.0):

      File "/usr/local/lib/python2.7/dist-packages/txthings/coap.py",
line 1338, in sendResponse
        print "Token: %s" % (response.token)
      File "/usr/local/lib/python2.7/dist-packages/twisted/logger/_io.py",
line 163, in write
        string = string.decode(self._encoding)
      File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
        return codecs.utf_8_decode(input, errors, True)
    exceptions.UnicodeDecodeError: 'utf8' codec can't decode byte 0xae
in position 7: invalid start byte

Although it is triggered by simple print, it seems to be caused by
logging. Does new logging framework need any configuration to stay
compatible with the old one?

Best regards
Maciej Wasilak



More information about the Twisted-Python mailing list