#πŸ”’ cogs error

51 messages Β· Page 1 of 1 (latest)

harsh niche
#

i get this error everytime i run my code: py Traceback (most recent call last): File "c:\Users\idkla\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 198, in _run_module_as_main return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\idkla\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 88, in _run_code exec(code, run_globals) File "c:\Users\idkla\.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy\__main__.py", line 39, in <module> cli.main() File "c:\Users\idkla\.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 430, in main run() File "c:\Users\idkla\.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 284, in run_file runpy.run_path(target, run_name="__main__") File "c:\Users\idkla\.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\idkla\.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "c:\Users\idkla\.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "C:\Users\idkla\AppData\Local\Programs\Python\Python312\Retry\python bot.py", line 43, in <module> bot.add_cog(help_cog(bot)) ^^^^^^^^^^^^^ TypeError: 'module' object is not callable

mossy jacinthBOT
#

@harsh niche

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

harsh niche
#

i have a cogs folder

#

and help_cog.py is in that folder

robust haven
#

how are you importing help_cog?

#

Does help_cog.py contain a function called help_cog() as well?

harsh niche
robust haven
#
from cogs.help_cog import help_cog
#

Did you import like that ? ☝️

harsh niche
harsh niche
#
bot.add(help_cog(bot))
robust haven
#

But how did you import it?

#

@harsh niche

harsh niche
#

lemme send

#

im lagging so hard it takes like a minute to send a messaeg

harsh niche
#

hold on im importing like you said

harsh niche
#

@robust haven

robust haven
harsh niche
#

i get same error

robust haven
harsh niche
#

my code is kinda organised

#

import stuff at top n stuff

robust haven
#

then I have no idea. Hard to see without seeing

robust haven
harsh niche
#

when i try to start it it wont start

robust haven
#

Can you share the latest traceback?

harsh niche
#

i get that error

harsh niche
#

!paste

mossy jacinthBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

robust haven
#

ok strange

#

no idea

#

sorry

harsh niche
#

i wait for someone else ig

#

if sum1 can help ping me

#

😭

harsh niche
#

...

harsh niche
#

!close ...

mossy jacinthBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.