Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle:48 #779

Open
3 tasks done
Wearant opened this issue Aug 8, 2023 · 0 comments
Open
3 tasks done

handle:48 #779

Wearant opened this issue Aug 8, 2023 · 0 comments
Assignees
Labels
bug Something isn't working vkbottle-types

Comments

@Wearant
Copy link

Wearant commented Aug 8, 2023

Checklist

  • Я уверен, что это баг фреймворка
  • Я искал похожие баги в issues
  • Я установил последнюю версию (pip3 install -U https://github.com/vkbottle/vkbottle/archive/dev.zip) и проблема осталась

Описание

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
@Wearant Wearant added the bug Something isn't working label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vkbottle-types
Projects
None yet
Development

No branches or pull requests

2 participants