Menu

#3 Problem with encoding

0.3.3
open
nobody
Core (2)
5
2009-11-25
2009-11-25
Anonymous
No

If the output of the test has a char that isn't ascii, then while saving the output of the test into the stream an UnicodeError is raised on line 277 of core.py (version 0.3.3).

To solve this problem what I did was:
aux = unicode(self._get_err_type(), 'utf-8', 'ignore')
stream.write(aux)

instead of:
stream.write(self._get_err_type())

Hopes this helps....

Discussion


Log in to post a comment.

MongoDB Logo MongoDB