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

WatchChannels intermittently stop working #347

Closed
SebastiaanZ opened this Issue Apr 9, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@SebastiaanZ
Copy link
Member

commented Apr 9, 2019

You've probably noticed that the watch channels (bigbrother & talent-pool) sometimes stop working until the cog is reloaded. After searching the logs, I've found this unretrieved exception:

00077298 | Apr 07 13:11:27 pd.beardfist.com Bot: |                        asyncio |    ERROR | Task exception was never retrieved
00077299 | future: <Task finished coro=<BigBrother.consume_messages() done, defined at /bot/bot/cogs/bigbrother.py:174> exception=Forbidden('Forbidden (status code: 403): cannot retrieve attachment',)>
00077300 | Traceback (most recent call last):
00077301 |   File "/bot/bot/cogs/bigbrother.py", line 194, in consume_messages
00077302 |     await self.log_message(msg, channel)
00077303 |   File "/bot/bot/cogs/bigbrother.py", line 288, in log_message
00077304 |     await messages.send_attachments(message, destination)
00077305 |   File "/bot/bot/utils/messages.py", line 99, in send_attachments
00077306 |     await attachment.save(file)
00077307 |   File "/bot/.venv/src/discord-py/discord/message.py", line 102, in save
00077308 |     data = await self._http.get_attachment(self.url)
00077309 |   File "/bot/.venv/src/discord-py/discord/http.py", line 225, in get_attachment
00077310 |     raise Forbidden(resp, 'cannot retrieve attachment')
00077311 | discord.errors.Forbidden: Forbidden (status code: 403): cannot retrieve attachment

My guess is that this is the root of the problem, since it stops the consume_messages() Task.

This should be fixed in the rewrite of the WatchChannels that's planned for the Django branch of the bot. See #317.

@SebastiaanZ SebastiaanZ added the bug label Apr 9, 2019

@SebastiaanZ SebastiaanZ self-assigned this Apr 9, 2019

@sco1

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

This seems like something we shouldn’t put off fixing. It’s not a new feature and we shouldn’t have to regularly restart the cog to keep it functioning.

@SebastiaanZ

This comment has been minimized.

Copy link
Member Author

commented Apr 9, 2019

That's true. I'll put in a fix for it asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.