Answer the question
In order to leave comments, you need to log in
How to treat a Telegram bot crash if a user with Cyrillic in his nickname writes to him?
The bot is based on python, authorization by chatID is screwed on it.
If a user who has a username in which there is Cyrillic writes to him, he falls.
Until recently, everything was fine.
Can you tell me why and how to fix it?
Thank you.
Answer the question
In order to leave comments, you need to log in
Solved with:
import sys
reload(sys)
sys.setdefaultencoding('utf8')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question