You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If trying to patch a library that uses something like:
myresponse.read(decode_content=True) then patching failes with:
Editing VCRHTTPResponse.read as follows fixes the issue:
def read(self, *args, **kwargs):
# urllib3 allows the kwarg 'decode_content' but BytesIO does not support it
kwargs.pop("decode_content", None)
return self._content.read(*args, **kwargs)
I'm not sure if this is the way to go though.
The text was updated successfully, but these errors were encountered:
urllib3
allows the kwargsdecode_content=None
andcache_content=False
.See: https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.read
If trying to patch a library that uses something like:
myresponse.read(decode_content=True)
then patching failes with:Editing VCRHTTPResponse.read as follows fixes the issue:
I'm not sure if this is the way to go though.
The text was updated successfully, but these errors were encountered: