Answer the question
In order to leave comments, you need to log in
How to debug handlers in Pycharm?
Good Friday everyone! Friends, I am training with writing a bot (I took the telebot library) I found a simple example where there is such a code:
@bot.message_handler(content_types=['photo'])
def handle_docs_photo(message):
try:
file_info = bot.get_file(message.photo[len(message.photo) - 1].file_id)
downloaded_file = bot.download_file(file_info.file_path)
src = 'D:\\temp\\test\\' + (file_info.file_path).replace('/', '\\')
with open(src, 'wb') as new_file:
new_file.write(downloaded_file)
bot.reply_to(message, "Фото добавлено")
except Exception as e:
bot.reply_to(message, e)
Answer the question
In order to leave comments, you need to log in
javedimka @javedimka right-
click on the circle and see that All is checked so that all threads stop.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question