When using sympy with mod_wsgi pretty printing (with unicode) tries to determine encoding of sys.stdout. When running under mod_wsgi sys.stdout is restricted from all access and thus causing a traceback.
Function in question is pretty_try_use_unicode()
Would it be just enough to add IOError to catched exceptions along with UnicodeError? Is there a better solution?
--
Jani Tiainen