Answer the question
In order to leave comments, you need to log in
How to get errors from a function in python?
Good evening friends!
I have a bot. I send a message with:
api.messages.send(access_token=token, user_id=str(id_user), message=message, attachment='')
error = api.messages.send(access_token=token, user_id=str(id_user), message=message, attachment='')
Answer the question
In order to leave comments, you need to log in
try + exception.
try:
Пробуем что то сделать например взять данные с сайта.
return данные
except Exception:
return "Не могу подключиться!"
pass
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question