Discord.py Error log Help?

Status
This thread has been locked.

Satan

Devil#0666
Supreme
Feedback score
52
Posts
3,667
Reactions
1,442
Resources
0
Code:
File "bot.py", line 35, in <module>
bot.load_extension(f'cogs.{extension}')
File "/home/container/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 618, in load_extension
lib.setup(self)
File "/home/container/cogs/dm.py", line 213, in setup
bot.add_cog(DM(bot))
File "/home/container/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 543, in add_cog
raise TypeError('cogs must derive from Cog')
TypeError: cogs must derive from Cog
Failed to load extension configuration.
Traceback (most recent call last):
File "bot.py", line 35, in <module>
bot.load_extension(f'cogs.{extension}')
File "/home/container/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 618, in load_extension
lib.setup(self)
File "/home/container/cogs/configuration.py", line 132, in setup
bot.add_cog(Configuration(bot))
File "/home/container/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 543, in add_cog
raise TypeError('cogs must derive from Cog')
TypeError: cogs must derive from Cog

The files were working fine before. Not sure why this error came about. What does this error mean?
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

DDarkInferno

Feedback score
16
Posts
311
Reactions
63
Resources
0
Are you using the rewrite version or async? If you're using the rewrite version have you updated it recently? There was a new update pushed to the rewrite version and that could be causing your problem.

 

Rj

PhD Candidate, Control Theorist
Supreme
Feedback score
7
Posts
730
Reactions
221
Resources
0
Make sure you are using Python 3.7 or later because f-strings are not supported in earlier versions. (They might be supported in 3.6 too, but I’m 99% sure they are new with 3.7).

Type “python -v” in Command Prompt to see what version you have.
It's because rewrite was updated and reworked the way cogs work making his bot not work;
and f-strings came in python 3.6
 

Satan

Devil#0666
Supreme
Feedback score
52
Posts
3,667
Reactions
1,442
Resources
0
Make sure you are using Python 3.7 or later because f-strings are not supported in earlier versions. (They might be supported in 3.6 too, but I’m 99% sure they are new with 3.7).

Type “python -v” in Command Prompt to see what version you have.
Will pyton3.7 fix the problem?
 

Jami

Yep.
Premium
Feedback score
34
Posts
602
Reactions
239
Resources
0
Will pyton3.7 fix the problem?
You have multiple errors, I think it'll fix some of them, also if you don't want to update to Python 3.7 you can use this:

lrsXpgI.jpg
 

Satan

Devil#0666
Supreme
Feedback score
52
Posts
3,667
Reactions
1,442
Resources
0
You have multiple errors, I think it'll fix some of them, also if you don't want to update to Python 3.7 you can use this:

lrsXpgI.jpg
Idk how to do this. Can you add me on discord and i throw you the files? I already updated to python3.7 by now, but can revert to 3.6 if the files can be fixed. Otherwise im on my way to make a thread on commissioning a dev to recreate the bot for me.
 

Jami

Yep.
Premium
Feedback score
34
Posts
602
Reactions
239
Resources
0
Idk how to do this. Can you add me on discord and i throw you the files? I already updated to python3.7 by now, but can revert to 3.6 if the files can be fixed. Otherwise im on my way to make a thread on commissioning a dev to recreate the bot for me.
Added, however it's 1:35AM so will probably go to sleep right now.
 
Status
This thread has been locked.
Top