voronind / vk

vk.com API python wrapper
MIT License
397 stars 87 forks source link

Ошибка при указании peer_id #114

Closed ghost closed 6 years ago

ghost commented 6 years ago

File "/home/bot.py", line 17, in msgSend

return vk.messages.send(peer_id = peer_id, message = message)

File "/usr/local/lib/python3.6/dist-packages/vk/api.py", line 173, in call

return self._api._session.make_request(self)

File "/usr/local/lib/python3.6/dist-packages/vk/api.py", line 102, in make_request

raise error

vk.exceptions.VkAPIError: 100. One of the parameters specified was missing or invalid: peer_id is accepted only from version 5.38. request_params = {'oauth': '1', 'method': 'messages.send', 'v': '5.8', 'peer_id': '123456789'}

ghost commented 6 years ago

Нашёл ошибку самостоятельно) Указал версию VK API ввиде числа, а не строки