I
I
Irina2018-08-26 13:30:48
Python
Irina, 2018-08-26 13:30:48

If the Telegram bot receives a message in the text, which is "*", then it gives an error. How to fix?

How to eliminate the error. I tried to set the condition in the handler for the presence of an 'asterisk' in the text. The condition is met, but the error is still thrown:

(__init__.py:418 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned HTTP 400 Bad Request. Response body:
[b'{"ok":false,"error_code":400," description":"Bad Request: can\'t parse entities: Can\'t find end of the entity starting at byte offset 60"}']"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AlmazKayum, 2018-08-30
@vera_ira

there was a similar bug, it reacts to markdown.
if markup is needed, change it to html.
if not needed, turn it off.

L
letchikazarov, 2021-03-11
@letchikazarov

The problem is that when you find the string you are trying to query - the answer contains an underscore or other forbidden characters in the string

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question