Делаю бота для вк. При импорте VkBotLongPoll, VkBotEventType возникает ошибка. Код:
import vk_api
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
from vk_api.keyboard import VkKeyboard, VkKeyboardColor
print('Start Bot')
token = "токен"
vk_session = vk_api.VkApi(token=activeToken)
session_api = vk_session.get_api()
longpoll = VkBotLongPoll(vk_session, 184658401) #ошибка на этой строке
Ошибка:
C:\Users\Кирилл\AppData\Local\Programs\Python\Python35\python.exe H:/Job/Python/VkNewBot/Main.py
Start Bot
Traceback (most recent call last):
File "H:/Job/Python/VkNewBot/Main.py", line 17, in
longpoll = VkBotLongPoll(vk_session, 184658401)
File "C:\Users\Кирилл\AppData\Local\Programs\Python\Python35\lib\site-packages\vk_api\bot_longpoll.py", line 207, in __init__
self.update_longpoll_server()
File "C:\Users\Кирилл\AppData\Local\Programs\Python\Python35\lib\site-packages\vk_api\bot_longpoll.py", line 220, in update_longpoll_server
response = self.vk.method('groups.getLongPollServer', values)
File "C:\Users\Кирилл\AppData\Local\Programs\Python\Python35\lib\site-packages\vk_api\vk_api.py", line 636, in method
raise error
vk_api.exceptions.ApiError: [100] One of the parameters specified was missing or invalid: longpoll for this group is not enabled.
Process finished with exit code 1