Skip to content

I cannot run my bot. #9181

@lostinfinite

Description

@lostinfinite

Summary

The new update is causing this error. discord.ext.commands.errors.ExtensionNotFound: Extension 'cogs.cog_example' could not be loaded.

Reproduction Steps

I tried to import cogs.cogs_example. discord.ext.commands.errors.ExtensionNotFound: Extension 'cogs.cog_example' could not be loaded.

Minimal Reproducible Code

extensions = ['cogs.cog_example', 'cogs.other_cog']
async def load_extensions():
    for extension in extensions:
        await bot.load_extension(extension)

if __name__ == '__main__':  # Ensures this is the file being ran
    loop = asyncio.get_event_loop()
    loop.run_until_complete(load_extensions())
    loop.run_until_complete(bot.start('TOKEN'))

Expected Results

the bot to run

Actual Results

discord.ext.commands.errors.ExtensionNotFound: Extension 'cogs.cog_example' could not be loaded.

Intents

intents = discord.Intents.default() intents.messages = True bot = commands.Bot(command_prefix='/', intents=intents)

System Information

  • Python v3.9.2-final
  • discord.py v2.2.0-alpha
    • discord.py metadata: v2.2.0a0
  • aiohttp v3.7.4.post0
  • system info: Linux 5.10.147-20158-g0a75306e5639 Fix issue with author changing type #1 SMP PREEMPT Sun Nov 27 20:52:05 PST 2022

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis is not right.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions