Answer the question
In order to leave comments, you need to log in
Photo upload error?
Here is my program:
def adc_2(message):
bot.send_photo(config.worker, message.photo[0].file_id)
bot.send_message(message.chat.id, mess1, reply_markup=keyboard)
bot.register_next_step_handler(message, menu)
Answer the question
In order to leave comments, you need to log in
There is nothing in message.photo, so this error occurs. Wrap this line in the condition that message.photo is a list.
if type(message.photo) is list
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question