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

[BUG] ERROR when closing group conversation (dev-version). #3052

Closed
Tracked by #143
Jerrie-Aries opened this issue Jun 24, 2021 · 1 comment
Closed
Tracked by #143

[BUG] ERROR when closing group conversation (dev-version). #3052

Jerrie-Aries opened this issue Jun 24, 2021 · 1 comment
Labels
beta Feedback for beta testing bug This is a confirmed bug staged Staged for next version

Comments

@Jerrie-Aries
Copy link
Contributor

Describe the bug
Error raised when closing group conversation and the thread channel is not getting deleted.

Bot Info
Bot version (check with @modmail about):
-v3.10.0-dev3
Host method (Heroku, self-host, etc):
-Self-host

To Reproduce
Steps to reproduce the behavior:

  1. Who can reproduce (ex. anyone, owners)?
    Supporters
  2. Where can it be reproduced (ex. in thread channels, recipient DM's)?
    Thread channel
  3. Done what to cause the error?
    Close the thread using ?close command.
  4. Any recently made changes to your bot?
    No
  5. Errored

Error Logs

06/24/21 21:45:37 __main__[1562] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "C:\Users\Username\.virtualenvs\Modmail-Y9MQGjgg\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "C:\Users\Username\Projects\Modmail\cogs\modmail.py", line 421, in close
    await thread.close(closer=ctx.author, after=close_after, message=message, silent=silent)
  File "C:\Users\Username\Projects\Modmail\core\thread.py", line 408, in close
    await self._close(closer, silent, delete_channel, message)
  File "C:\Users\Username\Projects\Modmail\core\thread.py", line 505, in _close
    message = self.bot.formatter.format(
  File "C:\Users\Username\AppData\Local\Programs\Python\Python38-32\lib\string.py", line 163, in format
    return self.vformat(format_string, args, kwargs)
  File "C:\Users\Username\AppData\Local\Programs\Python\Python38-32\lib\string.py", line 167, in vformat
    result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
  File "C:\Users\Username\AppData\Local\Programs\Python\Python38-32\lib\string.py", line 177, in _vformat
    self.parse(format_string):
  File "C:\Users\Username\AppData\Local\Programs\Python\Python38-32\lib\string.py", line 261, in parse
    return _string.formatter_parser(format_string)
TypeError: expected str, got NoneType

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Username\.virtualenvs\Modmail-Y9MQGjgg\lib\site-packages\discord\ext\commands\bot.py", line 902, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\Username\.virtualenvs\Modmail-Y9MQGjgg\lib\site-packages\discord\ext\commands\core.py", line 864, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\Username\.virtualenvs\Modmail-Y9MQGjgg\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: expected str, got NoneType
C:\Users\Username\AppData\Local\Programs\Python\Python38-32\lib\asyncio\events.py:81: RuntimeWarning: coroutine 'Messageable.send' was never awaited
  self._context.run(self._callback, *self._args)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
C:\Users\Username\AppData\Local\Programs\Python\Python38-32\lib\asyncio\events.py:81: RuntimeWarning: coroutine 'ConfigManager.update' was never awaited
  self._context.run(self._callback, *self._args)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Additional context
I believe the error was raised from here:
https://github.com/kyb3r/modmail/blob/e79432525fde5efe69550fa7d70bf01eb2be80d3/core/thread.py#L505-L507
when the message was None.

@Jerrie-Aries Jerrie-Aries added the maybe: bug An unconfirmed bug label Jun 24, 2021
@fourjr fourjr added the beta Feedback for beta testing label Aug 7, 2021
@fourjr
Copy link
Collaborator

fourjr commented Aug 7, 2021

Resolved in v3.10.0-dev4

@fourjr fourjr closed this as completed Aug 7, 2021
@fourjr fourjr added bug This is a confirmed bug staged Staged for next version and removed maybe: bug An unconfirmed bug labels Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Feedback for beta testing bug This is a confirmed bug staged Staged for next version
Projects
None yet
Development

No branches or pull requests

2 participants