Python-telegram-bot: Issue with Updates. "A TelegramError was raised while processing the Update."

Created on 13 Sep 2016  路  3Comments  路  Source: python-telegram-bot/python-telegram-bot

Steps to reproduce

I don't know how to reproduce this issue...
I created a bot like StrangerBot and when there are around 14-16 users connected (about 20 minutes after starting the bot) the bot starts to fail with the updates.

Expected behaviour

The bot should take the ID of the user and put it in a variable

Actual behaviour

The bot can't take the ID and the variable remains empty.

Configuration

Operating System: Windows Server 2012 R2

Version of Python, python-telegram-bot & dependencies:

python -m telegram
python-telegram-bot 5.0.0
urllib3 1.17
certifi 2016.08.31
future 0.15.2
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]

Logs

It just give a general error about "the update".
I attached an image.
04c736f59ced4c374dc41e8ebc516ff9

question

Most helpful comment

I discovered the error
It was because the user blocked the bot and the code didn't continue

All 3 comments

Hello!
What you are seeing is the default log entry that shows when your code raises a TelegramError. That means that one of your API calls failed.

To get more details on the error, you can register an error handler (for general handling of errors, eg logging them) or wrap your API calls in a try/except block (to handle a specific API call).

Read this wiki article: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Exception-Handling

I discovered the error
It was because the user blocked the bot and the code didn't continue

This problem might have been caused by misformatted messages on my machine

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsmnbom picture jsmnbom  路  4Comments

xoancosmed picture xoancosmed  路  3Comments

tp6vup54 picture tp6vup54  路  3Comments

marekyggdrasil picture marekyggdrasil  路  5Comments

leandrotoledo picture leandrotoledo  路  4Comments