tmercswims / tmerc-cogs

Cogs for the Red Discord bot.
GNU General Public License v3.0
36 stars 28 forks source link

ImportError: No module named 'redbot' #93

Closed juubeey closed 5 years ago

juubeey commented 5 years ago

I usually use the massdm cog and it was working just fine but today I tried to use it (nothing wrong with the process) and I faced this issue. i tried it in both python versions ( 3.5 and 3.6 ) but still the same error

Here is the error I see in the console:

Traceback (most recent call last): File "/root/Red-DiscordBot/cogs/owner.py", line 64, in load self._load_cog(module) File "/root/Red-DiscordBot/cogs/owner.py", line 945, in _load_cog mod_obj = importlib.import_module(cogname) File "/usr/lib64/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 985, in _gcd_import File "", line 968, in _find_and_load File "", line 957, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 697, in exec_module File "", line 222, in _call_with_frames_removed File "/root/Red-DiscordBot/cogs/massdm.py", line 4, in from redbot.core import commands, checks ImportError: No module named 'redbot'

Here is the error I see on discord:

Cog was found and possibly loaded but something went wrong. Check your console or logs for more information.

tmercswims commented 5 years ago

Red v2, I'm guessing? Sorry, this is related to the fact that the default branch changed yesterday to the v3 branch, since v3 is now released, so your bot pulled the v3 branch and is trying to run v3 cogs, which of course won't work.

Here is what you can do to fix it:

  1. Remove my repo from your bot: [p]cog repo remove <whatever-you-named-it>
  2. Re-add the repo, and include the branch at the end: [p]cog repo add tmerc-cogs https://github.com/tmercswims/tmerc-cogs@v2
  3. Re-install any cogs that came from my repo, to get the bot re-oriented about where they came from. All settings/configurations should be safe.

Let me know if that doesn't work, or if you run into any other issues. Apologies again!

juubeey commented 5 years ago

Now it's working when including the branch Thank you so much for help ! <3 Good luck with the V3 ! Best regards