Twentysix26 / x26-Cogs

General purpose cogs for Red V3
GNU General Public License v3.0
41 stars 30 forks source link

[Bug] Defender will not load #62

Closed jriggz closed 1 year ago

jriggz commented 1 year ago

Cog

Describe the bug Since Red's update to 3.5 and then 3.51, Defender no longer loads. There was also a python point release.

To Reproduce Steps to reproduce the behavior:

  1. Start up Red 3.51
  2. [p]load defender
  3. Look at Red's console.
  4. Alternatively, if you just noticed that Red had updated and unloaded your cogs, follow the instructions the bot will have DM'ed you (screenshot below).
  5. [p]load Downloader
  6. [P]cog reinstallreqs to regenerate lib folder
  7. Restart Red
  8. [p]load defender

Steps 1-3 or 4-8 yield the same trace (I've got a backup of the bot so I was able to reproduce the error even after following the instructions).

[2023-05-10 06:13:42] [ERROR] red: Package loading failed Traceback (most recent call last): File "/data/venv/lib/python3.11/site-packages/redbot/core/core_commands.py", line 188, in _load await bot.load_extension(spec) File "/data/venv/lib/python3.11/site-packages/redbot/core/bot.py", line 1680, in load_extension lib = spec.loader.load_module() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 605, in _check_name_wrapper File "", line 1120, in load_module File "", line 945, in load_module File "", line 290, in _load_module_shim File "", line 721, in _load File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/data/cogs/CogManager/cogs/defender/init.py", line 2, in from .defender import Defender File "/data/cogs/CogManager/cogs/defender/defender.py", line 24, in from .abc import CompositeMetaClass File "/data/cogs/CogManager/cogs/defender/abc.py", line 24, in from .core.warden.rule import WardenRule File "/data/cogs/CogManager/cogs/defender/core/warden/rule.py", line 25, in from .utils import has_x_or_more_emojis, REMOVE_C_EMOJIS_RE, run_user_regex, make_fuzzy_suggestion, delete_message_after File "/data/cogs/CogManager/cogs/defender/core/warden/utils.py", line 1, in from fuzzywuzzy import fuzz, process ModuleNotFoundError: No module named 'fuzzywuzzy'

Expected behavior I expected the cog to load without issue. Provided that happens, I expect the cog to load its configs.

Screenshots image image

Twentysix26 commented 1 year ago

As announced, Red 3.5 is a breaking update.
Cogs that work on older Red versions will not work on 3.5. There hasn't been a new Defender update since the 3.5 release but there will be one soon. In the meantime, what you can find on the dev branch is 3.5 compatible.

jriggz commented 1 year ago

I downgraded to 3.4.19 and py3.9 to get Defender to work again. Seems fine without data corruption so far. It’s not a solution (in the least), but at least I can still use Defender. I’ll check out the dev branch shortly. Thanks!

John Abele @.*** 267-250-5313 My pronouns are they/them/theirs


From: Twentysix @.> Sent: Wednesday, May 10, 2023 1:22:23 PM To: Twentysix26/x26-Cogs @.> Cc: Lauren @.>; Author @.> Subject: Re: [Twentysix26/x26-Cogs] [Bug] Defender will not load (Issue #62)

Closed #62https://github.com/Twentysix26/x26-Cogs/issues/62 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/Twentysix26/x26-Cogs/issues/62#event-9215273175, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD2PFRE7VYTOHUQCLKLR643XFP2H7ANCNFSM6AAAAAAX4XMOBI. You are receiving this because you authored the thread.Message ID: @.***>