Answer the question
In order to leave comments, you need to log in
ApiTelegramException How to solve this problem?
for usl in db.get_hash_data(message.from_user.id):
adv_link = f"<a href={usl[3]}> Ссылка на объявление</a>"
bot.send_message(message.chat.id, adv_link, parse_mode= 'HTML')
ApiTelegramException("A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: can't parse entities: Unexpected end of name token at byte offset 8")
Answer the question
In order to leave comments, you need to log in
Here looking what DB you use. If it is MySQL, then it returns the response from the database in the form of a Dictionary {url:www.tvoyurl.com}. In this case, you need to pull out something like
for usl in db.get_hash_data(message.from_user.id):
adv_link = f"<a href={usl[3]["твой_ключ"]}> Ссылка на объявление</a>"
bot.send_message(message.chat.id, adv_link, parse_mode= 'HTML')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question