From 5afa8f703a943d19205f31ab6f84cb1efee2ff91 Mon Sep 17 00:00:00 2001 From: Gintaras Jak Date: Thu, 16 Jul 2020 16:57:36 +0300 Subject: [PATCH] Ignore utf8 decoding errors in content --- vcr/stubs/httpx_stubs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcr/stubs/httpx_stubs.py b/vcr/stubs/httpx_stubs.py index 68ee38e..f2b99fd 100644 --- a/vcr/stubs/httpx_stubs.py +++ b/vcr/stubs/httpx_stubs.py @@ -29,7 +29,7 @@ def _to_serialized_response(httpx_reponse): "status_code": httpx_reponse.status_code, "http_version": httpx_reponse.http_version, "headers": _transform_headers(httpx_reponse), - "content": httpx_reponse.content.decode("utf-8"), + "content": httpx_reponse.content.decode("utf-8", "ignore"), }