def convert_body_to_unicode(resp):
    try:
        if not isinstance(resp['body']['string'], six.text_type):
            resp['body']['string'] = resp['body']['string'].decode('utf-8')
    except (KeyError, TypeError, UnicodeDecodeError):
        # The thing we were converting either wasn't a dictionary or didn't
        # have the keys we were expecting.  Some of the tests just serialize
        # and deserialize a string.

        # Also, sometimes the thing actually is binary, so if you can't decode
        # it, just give up.
        pass
    return resp
If the request body is bytes, decode it to a string (for python3 support)
dataset/ETHPy150Open kevin1024/vcrpy/vcr/serializers/compat.py/convert_body_to_unicode