Raptor123471 / DingoLingo

A Discord music bot written in Python with support for Youtube, SoundCloud, Spotify, Bandcamp, Twitter, and custom files.
GNU General Public License v3.0
282 stars 165 forks source link

Cogs with no setup #48

Closed Finnlious closed 2 years ago

Finnlious commented 2 years ago

Every time the main bot gets opened, the only error that comes through is "module config has no setup". Even unmodified (except for tokens) it still has this issue.

Raptor123471 commented 2 years ago

Can you post the full error here? I am not able to reproduce the issue on multiple instances. Check to make sure you have the latest bot version, an updated python install, look for possible modules conflicting with the name config and reinstall your modules with the --force-reinstall pip flag. OS info would be helpful also.

Finnlious commented 2 years ago
No` module named 'musicbot'
No module named 'musicbot'
No module named 'musicbot'
Traceback (most recent call last):
 File "C:\Python39\lib\site-packages\discord\ext\commands\bot.py" line 612, in _load_from_module_spec setup = getattr(lib, 'setup')
AttributeError: module 'config' has no attribute 'setup'

During handling of the above exception, another exception occured

Traceback (most recent call last):
 File "C:\Users\rektg\Documents\Discord Bot\run.py", line 156, in <module> client.load_extension(f'cogs.{filename[:-3]}')
 File "C:\Python39\lib\site-packages\discord\ext\commands\bot.py" line 678, in load extension self._load_from_module_spec(spec, name)
 File "C:\Python39\lib\site-packages\discord\ext\commands\bot.py" line 615, in _load_from_module_spec raise errors.NoEntryPointError(key)
discord.ext.commands.error.NoEntryPointError: Extension 'config" has no 'setup' function.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0000017EEDA02760>

I will reinstall my modules. Windows 10 Pro 19042.1237

Raptor123471 commented 2 years ago

Can you take a screenshot of your bot's folder structure? These are all directory local imports so there should be no issue importing them. Also how are you staring the bot? I'll check your response in the morning

Finnlious commented 2 years ago

github 2 github 1 I am opening it by double clicking it.

Raptor123471 commented 2 years ago

The bot is intended to run with it's stock directory structure. If you modify it like this you will need to edit the imports and paths to the new locations.

Finnlious commented 2 years ago

The issue is, when I ran it stock, it still came up with the same errors.

Raptor123471 commented 2 years ago

Cannot reproduce, Issue is with client setup/modification.