Skip to content

Getting a runTime error while trying to reload cogs? #6019

Discussion options

You must be logged in to vote

The problem lines here are:

            for extension in extensions:
                self.bot.reload_extension(extension)

Bot.extensions is a mapping and mappings cannot be modified during iteration.

You should modify the above lines to create a copy of the bot's extensions mapping before iteration.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by enterCheesyNameHere
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants