From d1e4eeaf306276c7eb2cf481531878fa2a5b90a8 Mon Sep 17 00:00:00 2001 From: Oleg Shlyazhko Date: Sat, 23 Jan 2016 19:49:55 +0300 Subject: [PATCH] fix urlopen data format --- telegram/utils/botan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/utils/botan.py b/telegram/utils/botan.py index 5b29c9ff2..0f9cbeedc 100644 --- a/telegram/utils/botan.py +++ b/telegram/utils/botan.py @@ -41,7 +41,7 @@ class Botan(object): uid=str(uid), name=quote(event_name)) request = Request(url, - data=data, + data=data.encode(), headers={'Content-Type': 'application/json'}) response = urlopen(request) if response.getcode() != 200: