modmail-dev / Modmail

A Discord bot that functions as a shared inbox between staff and members, similar to Reddit's Modmail.
https://docs.modmail.dev
GNU Affero General Public License v3.0
1.57k stars 4.59k forks source link

[BUG]: Large server size results in Guild.name == None #3088

Closed Tim269 closed 2 years ago

Tim269 commented 3 years ago

Bot Version

v3.10.2

How are you hosting Modmail?

Docker

Error Logs

https://hastebin.cc/woyanehixi

2021-09-05 20:00:09 __main__[1475] - ERROR: Ignoring exception in on_ready.
2021-09-05 20:00:09 __main__[1476] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "/modmailbot/bot.py", line 641, in on_ready
    ", ".join(guild.name for guild in other_guilds),
TypeError: sequence item 0: expected str instance, NoneType found

Screenshots

No response

Additional Information

The bot is in two discord servers at once. Might that trigger it?

The error is persistent for a while now. I asked first about in on the modmail-support channel in Feb 2021.

fourjr commented 3 years ago

Please join the support server and drop me a dm, I'm 4JR.

fourjr commented 3 years ago

Likely due to large server sizes and guild data being sent later, to add in a check when printing other_guilds.