diff --git a/examples/webhook_examples/webhook_flask_heroku_echo.py b/examples/webhook_examples/webhook_flask_heroku_echo.py index 7bbf2bf7c..a465abc1d 100644 --- a/examples/webhook_examples/webhook_flask_heroku_echo.py +++ b/examples/webhook_examples/webhook_flask_heroku_echo.py @@ -21,7 +21,9 @@ def echo_message(message): @server.route('/' + TOKEN, methods=['POST']) def getMessage(): - bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode("utf-8"))]) + json_string = request.get_data().decode('utf-8') + update = telebot.types.Update.de_json(json_string) + bot.process_new_updates([update]) return "!", 200 diff --git a/telebot/__init__.py b/telebot/__init__.py index 2a0c6cde1..7fcffc9de 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -461,7 +461,7 @@ def infinity_polling(self, timeout=20, long_polling_timeout=20, logger_level=log :param timeout: Request connection timeout :param long_polling_timeout: Timeout in seconds for long polling (see API docs) - :param logger_level: Custom logging level for infinity_polling logging. None/NOTSET = no error logging + :param logger_level: Custom logging level for infinity_polling logging. Use logger levels from logging as a value. None/NOTSET = no error logging """ while not self.__stop_polling.is_set(): try: diff --git a/telebot/version.py b/telebot/version.py index e3cfe4c6e..182ec1e22 100644 --- a/telebot/version.py +++ b/telebot/version.py @@ -1,3 +1,3 @@ # Versions should comply with PEP440. # This line is parsed in setup.py: -__version__ = '3.7.6' +__version__ = '3.7.7'