Infinite recursion when getting message mentions #45

Closed
opened 2026-02-15 23:16:22 -05:00 by yindo · 1 comment
Owner

Originally created by @defaultuser8848 on GitHub (Jan 4, 2025).

Describe the bug
I was going to get mentions list of a sent message with Message.mentions property,but an error has occurred.

Traceback (most recent call last):
  File "C:\Program Files\Python312\Lib\site-packages\revolt\ext\commands\command.py", line 97, in invoke
    return await self.callback(self.cog or context.client, context, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "(edited)\revolt_bug.py", line 15, in get_mentions
    await ctx.send(repr(ctx.message.mentions))
                        ^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions
    self.mentions.append(self.server.get_member(mention))
    ^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions
    self.mentions.append(self.server.get_member(mention))
    ^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions
    self.mentions.append(self.server.get_member(mention))
    ^^^^^^^^^^^^^
  [Previous line repeated 985 more times]
RecursionError: maximum recursion depth exceeded

To Reproduce
A small code snippet showing the error

Expected behavior
Return a list of Member objects which the messge is mentioned.

Library version

Name: revolt.py
Version: 0.2.0
Summary: Python wrapper for the revolt.chat API
Home-page: https://github.com/revoltchat/revolt.py
Author:
Author-email: Zomatree <me@zomatree.live>
License: MIT
Location: C:\Program Files\Python312\Lib\site-packages
Requires: aenum, aiohttp, typing-extensions, ulid-py
Required-by:
Originally created by @defaultuser8848 on GitHub (Jan 4, 2025). **Describe the bug** I was going to get mentions list of a sent message with `Message.mentions` property,but an error has occurred. ``` Traceback (most recent call last): File "C:\Program Files\Python312\Lib\site-packages\revolt\ext\commands\command.py", line 97, in invoke return await self.callback(self.cog or context.client, context, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "(edited)\revolt_bug.py", line 15, in get_mentions await ctx.send(repr(ctx.message.mentions)) ^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions self.mentions.append(self.server.get_member(mention)) ^^^^^^^^^^^^^ File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions self.mentions.append(self.server.get_member(mention)) ^^^^^^^^^^^^^ File "C:\Program Files\Python312\Lib\site-packages\revolt\message.py", line 152, in mentions self.mentions.append(self.server.get_member(mention)) ^^^^^^^^^^^^^ [Previous line repeated 985 more times] RecursionError: maximum recursion depth exceeded ``` **To Reproduce** [A small code snippet showing the error](https://gist.github.com/defaultuser8848/5646d5c93bb8aa1eca00b1b618340fa4) **Expected behavior** Return a list of `Member` objects which the messge is mentioned. **Library version** ``` Name: revolt.py Version: 0.2.0 Summary: Python wrapper for the revolt.chat API Home-page: https://github.com/revoltchat/revolt.py Author: Author-email: Zomatree <me@zomatree.live> License: MIT Location: C:\Program Files\Python312\Lib\site-packages Requires: aenum, aiohttp, typing-extensions, ulid-py Required-by: ```
yindo added the unconfirmed bug label 2026-02-15 23:16:22 -05:00
yindo closed this issue 2026-02-15 23:16:22 -05:00
Author
Owner

@defaultuser8848 commented on GitHub (Jan 4, 2025):

It seems like not a bug of current version,I installed it from pypi,so I think that the version on pypi is not same with this.

@defaultuser8848 commented on GitHub (Jan 4, 2025): It seems like not a bug of current version,I installed it from pypi,so I think that the version on pypi is not same with this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/python-client-sdk#45