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

[Downloader] [p]cog uninstall doesn't remove cog from bot._config.packages #3179

Closed
jack1142 opened this issue Dec 10, 2019 · 0 comments · Fixed by #3180
Closed

[Downloader] [p]cog uninstall doesn't remove cog from bot._config.packages #3179

jack1142 opened this issue Dec 10, 2019 · 0 comments · Fixed by #3180
Labels
Type: Bug

Comments

@jack1142
Copy link
Member

@jack1142 jack1142 commented Dec 10, 2019

Command bugs

Command name

[p]cog uninstall

What cog is this command from?

Downloader

What were you expecting to happen?

The bot to unload the cog AND remove it from bot._config.packages

What actually happened?

Bot unloaded the cog, but it didn't remove it from bot._config.packages therefore causing error on next bot start:

Failed to load package cogboard
Traceback (most recent call last):
  File "venv\lib\site-packages\redbot\core\bot.py", line 409, in pre_flight
    await asyncio.wait_for(self.load_extension(spec), 30)
  File "C:\Python37\lib\asyncio\tasks.py", line 442, in wait_for
    return fut.result()
  File "lib\site-packages\redbot\core\bot.py", line 648, in load_extension
    name = spec.name.split(".")[-1]
AttributeError: 'NoneType' object has no attribute 'name'

How can we reproduce this issue?

  1. Uninstall loaded cog that was installed through Downloader.
  2. Restart bot.
@jack1142 jack1142 added the Type: Bug label Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug
Projects
None yet
1 participant