Some test is adding non-ascii characters to the test output. There isn't much to go on as the error occurs when the entire xml result file is being generated.
A hack to workaround this is to patch /usr/lib/python2.7/codecs.py StreamWriter.write to do this:
def write(self, object):
""" Writes the object's contents encoded to self.stream.
"""
data, consumed = self.encode(unicode(object, errors=self.errors), self.errors) self.stream.write(data)
stream can then be opened with:
stream = open("/tmp/foo.xml", 'w', encoding='utf-8', errors='replace')
This will at least allow the output file to be generated with "??" characters replacing the non-ascii characters.
Some test is adding non-ascii characters to the test output. There isn't much to go on as the error occurs when the entire xml result file is being generated.
A hack to workaround this is to patch /usr/lib/ python2. 7/codecs. py StreamWriter.write to do this:
def write(self, object):
""" Writes the object's contents encoded to self.stream. unicode( object, errors= self.errors) , self.errors)
self.stream. write(data)
"""
data, consumed = self.encode(
stream can then be opened with: tmp/foo. xml", 'w', encoding='utf-8', errors='replace')
stream = open("/
This will at least allow the output file to be generated with "??" characters replacing the non-ascii characters.