Some of our users noticed that our !docs get command wasn't working. The problem was that the documentation inventory didn't load correctly and was empty. I was unable to trace the problem back to its cause, but I suspect a connection error that wasn't logged (see below).
A manual refresh of the inventory with !internal eval await bot.get_cog("Doc").refresh_inventory() fixed the issue for now, but we should probably have some logic in place to catch and handle this problem automatically.
This latter action also made me suspect a connection error, since it gave me the exception below. There's no logic to handle and/or log connection exceptions at the moment, so this exception can't be found in the bot logs.
(By the way, someone should probably kaizen the discord.py doc url as well, since the rewrite docs are no longer available, causing the exception below) Edit: I've changed the URLs for the discord.py docs in the database tables; it's working again.
In [193]: await bot.get_cog("Doc").refresh_inventory()
Out[193]:
File "/bot/bot/cogs/eval.py", line 167, in _eval
res = await func()
File "<string>", line 5, in func
File "/bot/bot/cogs/doc.py", line 184, in refresh_inventory
await asyncio.gather(*coros)
File "/bot/bot/cogs/doc.py", line 153, in update_single
for _, value in (await self.bot.loop.run_in_executor(None, fetch_func)).items():
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/bot/.venv/lib/python3.6/site-packages/sphinx/ext/intersphinx.py", line 171, in fetch_inventory
f = _read_from_url(inv, config=app.config)
File "/bot/.venv/lib/python3.6/site-packages/sphinx/ext/intersphinx.py", line 126, in _read_from_url
r.raise_for_status()
File "/bot/.venv/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: ('intersphinx inventory %r not fetchable due to %s: %s', 'https://discordpy.readthedocs.io/en/rewrite/objects.inv', <class 'requests.exceptions.HTTPError'>, '404 Client Error: Not Found for url: https://discordpy.readthedocs.io/en/rewrite/objects.inv')
Some of our users noticed that our
!docs getcommand wasn't working. The problem was that the documentation inventory didn't load correctly and was empty. I was unable to trace the problem back to its cause, but I suspect a connection error that wasn't logged (see below).A manual refresh of the inventory with
!internal eval await bot.get_cog("Doc").refresh_inventory()fixed the issue for now, but we should probably have some logic in place to catch and handle this problem automatically.This latter action also made me suspect a connection error, since it gave me the exception below. There's no logic to handle and/or log connection exceptions at the moment, so this exception can't be found in the bot logs.
(By the way, someone should probably kaizen the discord.py doc url as well, since the rewrite docs are no longer available, causing the exception below)Edit: I've changed the URLs for the discord.py docs in the database tables; it's working again.