Skip to content

The "Cogs" cog does not support loading of extensions which are packages instead of modules #479

@MarkKoz

Description

@MarkKoz

What "packages instead of modules" means is that the extension is an __init__.py of a sub-package i.e. the setup() function is in __init__.py (this is what watchchannels is doing right now).

The culprit is this code

if filename.endswith(".py") and "_" not in filename:

It's just an overcomplicated and inaccurate way to accomplish this, especially since the Bot.extensions attribute exists (perhaps it didn't when this code was written).

Metadata

Metadata

Assignees

Labels

s: WIPWork In Progresst: bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions