Z
Z
Zayllkora2022-01-15 16:26:25
Python
Zayllkora, 2022-01-15 16:26:25

How to fix "No such file or directory" error?

Wrote a simple telegram echo bot.
On startup, an error is thrown:

can't open file 'dd.py': [Errno 2] No such file or directory

How to fix it?

Here is the code itself:
import telebot
import config 

bot = telebot.Telebot(config.TOKEN)

@bot.message_handler(content_types=['text'])
def lalala(message):
  bot.send_mesag(message.chat.id, message.text)

# RUN
bot.polling(none_stop=True)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question