Answer the question
In order to leave comments, you need to log in
Telegram bot stops responding, is it getupdates, code or vps?
I wrote a bot in python3.6 , in the tasks of which it is worth responding to commands and in parallel checking whether there is a mention in the tasks to notify a particular user. The bot is launched on the hosting (Ubuntu 16.04 LTS) with the command
python3.6 /root/1.3/bot.py >/dev/null 2>/root/1.3/logs/errors.txt &
and in the processes I observe 5 active bot.py I
use getUpdates , I check automatic notifications like this:
threading.Thread(target=bot.polling).start()
while True:
autonotif()
time.sleep(60)
Traceback (most recent call last):
...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 2: ordinal not in range(128)
Exception in thread Thread-1:
Traceback (most recent call last):
...
UnicodeEncodeError: 'ascii' codec can't encode characters in position 35-41: ordinal not in range(128)
Answer the question
In order to leave comments, you need to log in
It looks like it crashes because of the encoding. A request comes from the user, where the first name and last name are in Cyrillic.
At 99%, the problem is in the code, and not on third-party services (hosting, telegram)
I would advise you to install some sentry free or other monitoring service. Yes, and move away from threads, "debug threads" - that's another adventure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question