Skip to content

Commit 969c5e7

Browse files
committed
Fix bytes not string.
1 parent 7346326 commit 969c5e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎examples/webhook_examples/webhook_cherrypy_echo_bot.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def index(self):
4444
'content-type' in cherrypy.request.headers and \
4545
cherrypy.request.headers['content-type'] == 'application/json':
4646
length = int(cherrypy.request.headers['content-length'])
47-
json_string = cherrypy.request.body.read(length)
47+
json_string = cherrypy.request.body.read(length).decode("utf-8")
4848
update = telebot.types.Update.de_json(json_string)
4949
bot.process_new_messages([update.message])
5050
return ''

0 commit comments

Comments
 (0)