Skip to content

Reaction Count error #73

@iiAmeer

Description

@iiAmeer

Checklist

  • I am sure the error is coming from Hydrogram's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U https://github.com/hydrogram/hydrogram/archive/dev.zip and reproduced the issue using the latest development version

Description

unable to count reactions

Steps to reproduce

it happens by it self when i message is recived

Code example

Logs

Traceback (most recent call last):
  File "/root/common/lib/python3.12/site-packages/hydrogram/dispatcher.py", line 286, in _process_packet
    parsed_update, handler_type = await parsed_result
                                  ^^^^^^^^^^^^^^^^^^^
  File "/root/common/lib/python3.12/site-packages/hydrogram/dispatcher.py", line 150, in _edited_message_parser
    parsed, _ = await self._message_parser(update, users, chats)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/common/lib/python3.12/site-packages/hydrogram/dispatcher.py", line 134, in _message_parser
    await hydrogram.types.Message._parse(
  File "/root/common/lib/python3.12/site-packages/hydrogram/types/messages_and_media/message.py", line 933, in _parse
    reactions = types.MessageReactions._parse(client, message.reactions)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/common/lib/python3.12/site-packages/hydrogram/types/messages_and_media/message_reactions.py", line 56, in _parse
    types.Reaction._parse_count(client, reaction)
  File "/root/common/lib/python3.12/site-packages/hydrogram/types/messages_and_media/reaction.py", line 73, in _parse_count
    reaction.count = reaction_count.count
    ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'count'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions