From 596dd035bf45a0d51495b71d5368fb37a43dca52 Mon Sep 17 00:00:00 2001 From: klux2 Date: Thu, 4 Jul 2019 14:29:32 +0200 Subject: [PATCH] fixed TypeError when run with Python 3.5 Signed-off-by: klux2 --- HSMensaW_botA.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HSMensaW_botA.py b/HSMensaW_botA.py index c503ef9..672d23e 100644 --- a/HSMensaW_botA.py +++ b/HSMensaW_botA.py @@ -236,7 +236,7 @@ def get_bot_id() -> int: if botID == -1: api_url = "https://api.telegram.org/bot" + telegram_bot_token + "/getMe" with urllib.request.urlopen(api_url) as response: - data = json.load(response) + data = json.loads(response.read().decode('utf-8')) botID = data["result"]["id"] return botID