From b9d458e643b7e9a5fdbd5dddb75e361c97dd533e Mon Sep 17 00:00:00 2001 From: Andy Kluger Date: Thu, 8 Oct 2015 16:39:22 -0400 Subject: [PATCH] Fix AttributeError on Python 3 --- telebot/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telebot/types.py b/telebot/types.py index e71ac05..92430e9 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -21,6 +21,7 @@ ForceReply """ import json +import six class JsonSerializable: @@ -70,7 +71,7 @@ class JsonDeserializable: def __str__(self): d = {} - for x, y in self.__dict__.iteritems(): + for x, y in six.iteritems(self.__dict__): if hasattr(y, '__dict__'): d[x] = y.__dict__ else: