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
#π cogs error
51 messages Β· Page 1 of 1 (latest)
@harsh niche
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.
how are you importing help_cog?
Does help_cog.py contain a function called help_cog() as well?
yeah lemme double chek
uh no
it was like
bot.add(help_cog(bot))
hold on
lemme send
im lagging so hard it takes like a minute to send a messaeg
i guess i didnt import it-
hold on im importing like you said
show me what you did
copy pasted this
i get same error
whered you put it?
like at the top
my code is kinda organised
import stuff at top n stuff
then I have no idea. Hard to see without seeing
maybe restart your bot?
Can you share the latest traceback?
i get that error
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.
π
i wait for someone else ig
if sum1 can help ping me
π
...
!close ...
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.