import vk_api
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
vk_session = vk_api.VkApi(token=token)
longpoll = VkBotLongPoll(vk_session, group_id)
for event in longpoll.listen():
print(event)
Traceback (most recent call last):
File "C:\Python\vk-bot\mathbot.py", line 10, in <module>
for event in longpoll.listen():
File "C:\Python\lib\site-packages\vk_api\bot_longpoll.py", line 274, in listen
for event in self.check():
File "C:\Python\lib\site-packages\vk_api\bot_longpoll.py", line 253, in check
for raw_event in response['updates']
File "C:\Python\lib\site-packages\vk_api\bot_longpoll.py", line 253, in <listcomp>
for raw_event in response['updates']
File "C:\Python\lib\site-packages\vk_api\bot_longpoll.py", line 214, in _parse_event
return event_class(raw_event)
File "C:\Python\lib\site-packages\vk_api\bot_longpoll.py", line 160, in __init__
if self.obj.peer_id < 0:
TypeError: '<' not supported between instances of 'NoneType' and 'int'