Quote:
Originally Posted by kovidgoyal
@jgoguen: I would suggest using the calibre prints() function to print or alternately to check for bytes in the log object you are using and force them to unicode.
|
Today I learned prints() isn't just a wrapper for print() in the Stream classes!
Looking at that shows where I'm going wrong, I'm expecting to need Unicode strings but from the way calibre.prints() works I actually need to be returning bytes instances. I'll work on changing the code to use calibre.prints(), thanks!