def _get_value(self, stream):
    try:
        return decode_output(stream.getvalue())
    except UnicodeError:
        stream.buf = decode_output(stream.buf)
        stream.buflist = [decode_output(item) for item in stream.buflist]
        return stream.getvalue()
def _get_value(self, stream):
    try:
        return decode_output(stream.getvalue())
    except UnicodeError:
        stream.buf = decode_output(stream.buf)
        stream.buflist = [decode_output(item) for item in stream.buflist]
        return stream.getvalue()