#Extension error

1 messages · Page 1 of 1 (latest)

teal fiber
#

I don't understand this error

Traceback (most recent call last):
File "cogs/main.py", line 46, in <module>
bot.load_extension(extension)
File "/opt/venv/lib/python3.8/site-packages/disnake/ext/commands/common_bot_base.py", line 469, in load_extension
spec = importlib.util.find_spec(name)
File "/nix/store/idahnf1p9ljp4j568idrwb5zbbcmdhm1-python3-3.8.14/lib/python3.8/importlib/util.py", line 94, in find_spec
parent = __import__(parent_name, fromlist=['__path__'])
ModuleNotFoundError: No module named 'cogs'
File "/opt/venv/lib/python3.8/site-packages/disnake/ext/commands/common_bot_base.py", line 469, in load_extension
spec = importlib.util.find_spec(name)
File "/nix/store/idahnf1p9ljp4j568idrwb5zbbcmdhm1-python3-3.8.14/lib/python3.8/importlib/util.py", line 94, in find_spec
parent = __import__(parent_name, fromlist=['__path__'])
ModuleNotFoundError: No module named 'cogs'
Traceback (most recent call last):
File "cogs/main.py", line 46, in <module>
bot.load_extension(extension)
File "/opt/venv/lib/python3.8/site-packages/disnake/ext/commands/common_bot_base.py", line 469, in load_extension
spec = importlib.util.find_spec(name)
File "/nix/store/idahnf1p9ljp4j568idrwb5zbbcmdhm1-python3-3.8.14/lib/python3.8/importlib/util.py", line 94, in find_spec
parent = __import__(parent_name, fromlist=['__path__'])
ModuleNotFoundError: No module named 'cogs'```
cosmic mantle
#

code pls

teal fiber
# cosmic mantle code pls
initial_extensions = ['cogs.minecraft', 'cogs.mod']

if __name__ == '__main__':
    for extension in initial_extensions:
        bot.load_extension(extension)```
cosmic mantle
#

"cogs/main.py"
rename ur cog

teal fiber
#

the file is main.py inside cogs folder

#

what to rename exactly

cosmic mantle
#

that's wrong

teal fiber
#

shall I move it outside folder

cosmic mantle
#

yep

#

read dat amazing guide pls

teal fiber
#

Thanks

#

/close