Konstantin Mikhailichenko2021-02-06 22:49:20
Konstantin Mikhailichenko, 2021-02-06 22:49:20

404 error in python how to solve?

for some reason, when I run the program, it gives an error: ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 404. Description: Not Found
Here is the code itself:

import telebot
bot = telebot.TeleBot ('*токен-скрыт*')
def get_text_messages(message):
 if message.text == "Привет":
    bot.send_message(message.from_user.id, "Привет, чем я могу тебе помочь?")
 elif message.text == "/help":
    bot.send_message(message.from_user.id, "Напиши привет")
    bot.send_message(message.from_user.id, "Я тебя не понимаю. Напиши /help.") 
bot.polling(none_stop=True, interval=0)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
soremix, 2021-02-06

Wrong token

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question