From 8475acd411aa6c2e0ed77ac82736030cb2da345b Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Wed, 21 Dec 2022 18:06:03 +0000 Subject: [PATCH] Encode string for Response --- pynyaata/flarerequests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynyaata/flarerequests.py b/pynyaata/flarerequests.py index 382897d..4212edb 100644 --- a/pynyaata/flarerequests.py +++ b/pynyaata/flarerequests.py @@ -42,7 +42,7 @@ class FlareRequests(Session): if "solution" in solution: resolved = Response() - resolved.raw = StringIO(solution["solution"]["response"]) + resolved.raw = StringIO(solution["solution"]["response"].encode()) resolved.status_code = solution["solution"]["status"] resolved.headers = solution["solution"]["headers"] resolved.url = url