From ee839da7c9890edac522ed953ac986a1b34f8036 Mon Sep 17 00:00:00 2001 From: zecktos <56479813+zecktos@users.noreply.github.com> Date: Sun, 13 Dec 2020 13:39:58 +0100 Subject: [PATCH] Fix for python3.9 'encoding' is deprecated and removed in Python 3.9 could fix this https://github.com/taizan-hokuto/pytchat/issues/24 --- pytchat/core/pytchat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytchat/core/pytchat.py b/pytchat/core/pytchat.py index 361057d..0cb76d4 100644 --- a/pytchat/core/pytchat.py +++ b/pytchat/core/pytchat.py @@ -168,7 +168,7 @@ class PytchatCore: with httpx.Client(http2=True) as client: try: response = client.post(self._fetch_url, json=param) - livechat_json = json.loads(response.text, encoding='utf-8') + livechat_json = json.loads(response.text) break except (json.JSONDecodeError, httpx.ConnectTimeout, httpx.ReadTimeout, httpx.ConnectError) as e: err = e