vkbottle / vkbottle

Сustomizable asynchronous VK API framework
https://vkbottle.readthedocs.io/ru/latest
MIT License
455 stars 100 forks source link

handle:48 #779

Closed Wearant closed 3 months ago

Wearant commented 1 year ago

Checklist

Описание

2023-08-08 20:28:32.094 | ERROR | vkbottle.exception_factory.error_handler.error_handler:handle:48 - 'message_reaction_event' is not a valid GroupEventType

Пример кода

@private_msg_labeler.raw_event(GroupEventType.MESSAGE_EVENT, dataclass=GroupTypes.MessageEvent)
async def handle_message_event(event: GroupTypes.MessageEvent):

Логи

2023-08-08 20:28:33.856 | ERROR    | vkbottle.exception_factory.error_handler.error_handler:handle:48 - 'message_reaction_event' is not a valid GroupEventType
Traceback (most recent call last):

  File "c:\Users\RYZEN\GITHUB\VK\Bots\AZ_Bot\bot.py", line 27, in <module>
    botAZ.run_forever()
    │     └ <function Bot.run_forever at 0x000001C9D1351300>
    └ <vkbottle.framework.bot.bot.Bot object at 0x000001C9D0CCCB90>

  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\site-packages\vkbottle\framework\bot\bot.py", line 129, in run_forever
    self.loop_wrapper.run()
    │    │            └ <function LoopWrapper.run at 0x000001C9D3592160>
    │    └ <vkbottle.tools.loop_wrapper.LoopWrapper object at 0x000001C9D0F6C610>
    └ <vkbottle.framework.bot.bot.Bot object at 0x000001C9D0CCCB90>
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\site-packages\vkbottle\tools\loop_wrapper.py", line 75, in run
    results = self.loop.run_until_complete(
              │    │    └ <function BaseEventLoop.run_until_complete at 0x000001C9D1628AE0>
              │    └ <ProactorEventLoop running=True closed=False debug=False>
              └ <vkbottle.tools.loop_wrapper.LoopWrapper object at 0x000001C9D0F6C610>
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 640, in run_until_complete
    self.run_forever()
    │    └ <function ProactorEventLoop.run_forever at 0x000001C9D2EB7920>
    └ <ProactorEventLoop running=True closed=False debug=False>
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 607, in run_forever
    self._run_once()
    │    └ <function BaseEventLoop._run_once at 0x000001C9D162A840>
    └ <ProactorEventLoop running=True closed=False debug=False>
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1922, in _run_once
    handle._run()
    │      └ <function Handle._run at 0x000001C9D15BA7A0>
    └ <Handle <TaskStepMethWrapper object at 0x000001C9CFA61300>()>
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    │    │            │    │           │    └ <member '_args' of 'Handle' objects>
    │    │            │    │           └ <Handle <TaskStepMethWrapper object at 0x000001C9CFA61300>()>
    │    │            │    └ <member '_callback' of 'Handle' objects>
    │    │            └ <Handle <TaskStepMethWrapper object at 0x000001C9CFA61300>()>
    │    └ <member '_context' of 'Handle' objects>
    └ <Handle <TaskStepMethWrapper object at 0x000001C9CFA61300>()>
> File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\site-packages\vkbottle\dispatch\base.py", line 20, in route
    if not await view.process_event(event):
                 │    │             └ {'group_id': 171780253, 'type': 'message_reaction_event', 'event_id': 'c662afbc87b1a92d6d592afcf9396232d7e7bd83', 'v': '5.131...
                 │    └ <function RawBotEventView.process_event at 0x000001C9D0F1CD60>
                 └ <RawBotEventView handlers={<GroupEventType.WALL_POST_NEW: 'wall_post_new'>: [BotHandlerBasement(dataclass=<class 'dict'>, han...
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\site-packages\vkbottle\dispatch\views\bot\raw.py", line 40, in process_event
    return GroupEventType(self.get_event_type(event)) in self.handlers
           │              │    │              │          │    └ {<GroupEventType.WALL_POST_NEW: 'wall_post_new'>: [BotHandlerBasement(dataclass=<class 'dict'>, handler=<FromFuncHandler newp...
           │              │    │              │          └ <RawBotEventView handlers={<GroupEventType.WALL_POST_NEW: 'wall_post_new'>: [BotHandlerBasement(dataclass=<class 'dict'>, han...
           │              │    │              └ {'group_id': 171780253, 'type': 'message_reaction_event', 'event_id': 'c662afbc87b1a92d6d592afcf9396232d7e7bd83', 'v': '5.131...
           │              │    └ <staticmethod(<function RawBotEventView.get_event_type at 0x000001C9D0F1CE00>)>
           │              └ <RawBotEventView handlers={<GroupEventType.WALL_POST_NEW: 'wall_post_new'>: [BotHandlerBasement(dataclass=<class 'dict'>, han...
           └ <enum 'GroupEventType'>
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\enum.py", line 711, in __call__
    return cls.__new__(cls, value)
           │   │       │    └ 'message_reaction_event'
           │   │       └ <enum 'GroupEventType'>
           │   └ <function Enum.__new__ at 0x000001C9CCD33060>
           └ <enum 'GroupEventType'>
  File "C:\Users\RYZEN\AppData\Local\Programs\Python\Python311\Lib\enum.py", line 1128, in __new__
    raise ve_exc
          └ None

ValueError: 'message_reaction_event' is not a valid GroupEventType
luwqz1 commented 3 months ago

https://github.com/vkbottle/types/pull/43