Fix bytes not string.

This commit is contained in:
FrankWang 2015-10-18 22:03:29 +08:00
parent 7346326bc3
commit 969c5e76ef
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class WebhookServer(object):
'content-type' in cherrypy.request.headers and \
cherrypy.request.headers['content-type'] == 'application/json':
length = int(cherrypy.request.headers['content-length'])
json_string = cherrypy.request.body.read(length)
json_string = cherrypy.request.body.read(length).decode("utf-8")
update = telebot.types.Update.de_json(json_string)
bot.process_new_messages([update.message])
return ''