L
L
Link-Z2020-05-01 20:34:48
Python
Link-Z, 2020-05-01 20:34:48

Can't solve the problem with VK servers in Vk_api?

In general, I write a bot in python'e, I need it to fix the message, the bot is authorized for the user, but even this does not help, an error pops up:

vk_api.exceptions.ApiError: [10] Internal server error


Waiting for what delays does not help anymore.
Maybe someone saw or someone had such an error, please tell me
Here is the code:
if responsive == '/закрепи':
          max_message = session_api.messages.getHistory(peer_id=event.peer_id)['count']
          text = []
          for i in range(0,max_message,200):
            mess = session_api.messages.getHistory(peer_id=event.peer_id, count=200,offset=i)['items']
            for element in mess:
               if element.get('action') == None:
               	text.append( str(element['id']))
          text = ','.join(text)
          print(text)
          message_id = text[0]
          print(message_id)
          session_api.messages.pin(peer_id=event.peer_id,message_id=message_id)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0ralo, 2020-05-01
@0ralo

CLICK

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question