Answer the question
In order to leave comments, you need to log in
VK API Exception Handling
Hello. Actually the title reflects the essence of the question. Have a function
def wall_post(message, vkapi, user_id):
try:
vkapi.wall.post(owner_id=user_id, message=message)
print("Сообщение '" + message + "' успешно отправлено на стену пользователя " + user_id)
except Exception as e:
print(str(e))
sleep(10)
vkapi.wall.post(owner_id=user_id, message=message)
14. Captcha needed. params = [{'key': 'oauth', 'value': '1'}, {'key': 'method', 'value': 'wall.post'}, {'key': 'access_token', 'value': 'b7359cbb3e7f8285d1c75acafc6168a4ccf600d2fb1419a859ef05362b2c59bf339608668de58496bc940'}, { 'key': 'timestamp', 'value': '1402169419'}, { 'key': 'owner_id', 'value': '115 809 454'}, { 'key': 'v', 'value': '5.20'}, {'key': 'message', 'value': 'f'}]
Answer the question
In order to leave comments, you need to log in
Remove spaces before colons and you will be happy. You cannot rely on examples alone, they are not always working for them.
You see the number 14 at the beginning. This is the error code. All api errors have different codes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question