Unban sends a attributeerror #6219

Closed
opened 2023-07-31 21:10:22 +02:00 by ltzmax · 3 comments
ltzmax commented 2023-07-31 21:10:22 +02:00 (Migrated from github.com)

What Red version are you using?

3.5.3

Cog name

Mod

Command name

unban

What did you expect to happen?

To unban without sending a error.

What actually happened?

Exception in command 'unban'
Traceback (most recent call last):
  File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redbot/Ballsdex-redbot/cogs/CogManager/cogs/mod/mod.py", line 704, in unban
    if await self._config.guild(guild).reinvite_on_unban():
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/redbot/core/config.py", line 364, in __getattr__
    raise AttributeError("'{}' is not a valid registered Group or value.".format(item))
AttributeError: 'reinvite_on_unban' is not a valid registered Group or value.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'reinvite_on_unban' is not a valid registered Group or value.

How can we reproduce this error?

  1. unban
  2. Wait until it send Unbanned that user from this server.
  3. Check traceback

Anything else?

No response

### What Red version are you using? 3.5.3 ### Cog name Mod ### Command name unban ### What did you expect to happen? To unban without sending a error. ### What actually happened? ```py Exception in command 'unban' Traceback (most recent call last): File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped ret = await coro(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/redbot/Ballsdex-redbot/cogs/CogManager/cogs/mod/mod.py", line 704, in unban if await self._config.guild(guild).reinvite_on_unban(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/redbot/core/config.py", line 364, in __getattr__ raise AttributeError("'{}' is not a valid registered Group or value.".format(item)) AttributeError: 'reinvite_on_unban' is not a valid registered Group or value. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke await ctx.command.invoke(ctx) File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1029, in invoke await injected(*ctx.args, **ctx.kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/redbot/.pyenv/versions/3.11.2/envs/redbot-3.5/lib/python3.11/site-packages/discord/ext/commands/core.py", line 244, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'reinvite_on_unban' is not a valid registered Group or value. ``` ### How can we reproduce this error? 1. unban <user> 2. Wait until it send `Unbanned that user from this server.` 3. Check traceback ### Anything else? _No response_
Jackenmen commented 2023-07-31 21:14:24 +02:00 (Migrated from github.com)

Is it possible that you didn't resolve conflicts properly? I see this config value here:
github.com/Cog-Creators/Red-DiscordBot@93b51acf31/redbot/cogs/mod/mod.py (L57)

Is it possible that you didn't resolve conflicts properly? I see this config value here: https://github.com/Cog-Creators/Red-DiscordBot/blob/93b51acf310419440caecbd4d35fce7e51ff47b8/redbot/cogs/mod/mod.py#L57
Jackenmen commented 2023-07-31 21:15:35 +02:00 (Migrated from github.com)

Actually, it looks like you're not using the core cog, the path shows that you override it with 3rd-party one.

Actually, it looks like you're not using the core cog, the path shows that you override it with 3rd-party one.
ltzmax commented 2023-07-31 21:17:25 +02:00 (Migrated from github.com)

Yeah its not a fork lmao, i missed that it's from a cog. sorry! :P

Yeah its not a fork lmao, i missed that it's from a cog. sorry! :P
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#6219
No description provided.