csua-backend icon indicating copy to clipboard operation
csua-backend copied to clipboard

discordbot bug: invalid email retry logic broken

Open robertquitt opened this issue 4 years ago • 1 comments

Jan 31 16:18:57 tap gunicorn[13171]: Ignoring exception in on_member_join
Jan 31 16:18:57 tap gunicorn[13171]: Traceback (most recent call last):
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/apps/discordbot/bot.py", line 49, in verify_member_email
Jan 31 16:18:57 tap gunicorn[13171]:     validate_email(msg.content)
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/venv/lib/python3.6/site-packages/django/core/validators.py", line 191, in __call__
Jan 31 16:18:57 tap gunicorn[13171]:     raise ValidationError(self.message, code=self.code)
Jan 31 16:18:57 tap gunicorn[13171]: django.core.exceptions.ValidationError: ['Enter a valid email address.']
Jan 31 16:18:57 tap gunicorn[13171]: During handling of the above exception, another exception occurred:
Jan 31 16:18:57 tap gunicorn[13171]: Traceback (most recent call last):
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/venv/lib/python3.6/site-packages/discord/client.py", line 343, in _run_event
Jan 31 16:18:57 tap gunicorn[13171]:     await coro(*args, **kwargs)
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/apps/discordbot/bot.py", line 112, in on_member_join
Jan 31 16:18:57 tap gunicorn[13171]:     await self.verify_member_email(member)
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/apps/discordbot/bot.py", line 63, in verify_member_email
Jan 31 16:18:57 tap gunicorn[13171]:     e,
Jan 31 16:18:57 tap gunicorn[13171]: TypeError: send() takes from 1 to 2 positional arguments but 3 were given

https://github.com/CSUA/csua-backend/blob/ff5ae5e36752329cc86e82434bd365629f4d24e8/apps/discordbot/bot.py#L60-L64

robertquitt avatar Feb 01 '21 20:02 robertquitt