timofurrer / colorful

Terminal string styling done right, in Python :snake: :tada:
MIT License
525 stars 23 forks source link

AttributeError: 'mod_wsgi.Log' object has no attribute 'encoding' #14

Closed amonsch closed 5 years ago

amonsch commented 6 years ago

Hi,

i am using colorful as part of a custom library which also runs in a web application. We use mod_wsgi to serve the application and it seems that mod_wsgi replaces sys.stdout with a custom "Log"-object which doesn' t provide the "encoding" attribute.

I think this scenario happens quite frequently and i think that this should be handled cracefully in colorful.