[V3] Help on non-existant subcommand #1554

Closed
opened 2018-04-20 16:37:34 +02:00 by bobloy · 5 comments
bobloy commented 2018-04-20 16:37:34 +02:00 (Migrated from github.com)

Type:

  • Suggestion
  • Bug

Brief description of the problem

help fails with error when asking for subcommand on command with no subcommands

Expected behavior

Tells user that no subcommands exists

Actual behavior

Exception in command 'help'
Traceback (most recent call last):
  File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\redbot\core\help_formatter.py", line 328, in help
    command = command.all_commands.get(key)
AttributeError: 'Command' object has no attribute 'all_commands'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\discord\ext\commands\core.py", line 62, in wrapped
    ret = yield from coro(*args, **kwargs)
  File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\redbot\core\help_formatter.py", line 344, in help
    color=ctx.bot.formatter.color,
  File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\redbot\core\help_formatter.py", line 77, in color
    if self.pm_check(self.context):
  File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\redbot\core\help_formatter.py", line 61, in pm_check
    return isinstance(ctx.channel, discord.DMChannel)
AttributeError: 'NoneType' object has no attribute 'channel'

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

Traceback (most recent call last):
  File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\discord\ext\commands\bot.py", line 886, in invoke
    yield from ctx.command.invoke(ctx)
  File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\discord\ext\commands\core.py", line 514, in invoke
    yield from injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\discord\ext\commands\core.py", line 71, in wrapped
    raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'channel'

Steps to reproduce

  1. Run [p]help help test
  2. Observe error
### Type: - [ ] Suggestion - [x] Bug ### Brief description of the problem `help` fails with error when asking for subcommand on command with no subcommands ### Expected behavior Tells user that no subcommands exists ### Actual behavior ``` Exception in command 'help' Traceback (most recent call last): File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\redbot\core\help_formatter.py", line 328, in help command = command.all_commands.get(key) AttributeError: 'Command' object has no attribute 'all_commands' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\discord\ext\commands\core.py", line 62, in wrapped ret = yield from coro(*args, **kwargs) File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\redbot\core\help_formatter.py", line 344, in help color=ctx.bot.formatter.color, File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\redbot\core\help_formatter.py", line 77, in color if self.pm_check(self.context): File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\redbot\core\help_formatter.py", line 61, in pm_check return isinstance(ctx.channel, discord.DMChannel) AttributeError: 'NoneType' object has no attribute 'channel' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\discord\ext\commands\bot.py", line 886, in invoke yield from ctx.command.invoke(ctx) File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\discord\ext\commands\core.py", line 514, in invoke yield from injected(*ctx.args, **ctx.kwargs) File "C:\Users\Bobloy\Documents\virtualenv\lib\site-packages\discord\ext\commands\core.py", line 71, in wrapped raise CommandInvokeError(e) from e discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'channel' ``` ### Steps to reproduce 1. Run `[p]help help test` 2. Observe error
palmtree5 commented 2018-04-24 00:34:22 +02:00 (Migrated from github.com)

I'm actually getting a different error when doing [p]help help test

Exception in command 'help'
Traceback (most recent call last):
  File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/redbot/core/help_formatter.py", line 328, in help
    command = command.all_commands.get(key)
AttributeError: 'Command' object has no attribute 'all_commands'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/discord/ext/commands/core.py", line 62, in wrapped
    ret = yield from coro(*args, **kwargs)
  File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/redbot/core/help_formatter.py", line 345, in help
    author=ctx.author.display_name))
TypeError: simple_embed() got an unexpected keyword argument 'author'

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

Traceback (most recent call last):
  File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 886, in invoke
    yield from ctx.command.invoke(ctx)
  File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/discord/ext/commands/core.py", line 514, in invoke
    yield from injected(*ctx.args, **ctx.kwargs)
  File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/discord/ext/commands/core.py", line 71, in wrapped
    raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: simple_embed() got an unexpected keyword argument 'author'
I'm actually getting a different error when doing `[p]help help test` ```py Exception in command 'help' Traceback (most recent call last): File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/redbot/core/help_formatter.py", line 328, in help command = command.all_commands.get(key) AttributeError: 'Command' object has no attribute 'all_commands' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/discord/ext/commands/core.py", line 62, in wrapped ret = yield from coro(*args, **kwargs) File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/redbot/core/help_formatter.py", line 345, in help author=ctx.author.display_name)) TypeError: simple_embed() got an unexpected keyword argument 'author' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 886, in invoke yield from ctx.command.invoke(ctx) File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/discord/ext/commands/core.py", line 514, in invoke yield from injected(*ctx.args, **ctx.kwargs) File "/home/palm/.pyenv/versions/redbot/lib/python3.6/site-packages/discord/ext/commands/core.py", line 71, in wrapped raise CommandInvokeError(e) from e discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: simple_embed() got an unexpected keyword argument 'author' ```
bobloy commented 2018-04-24 00:36:08 +02:00 (Migrated from github.com)

Run in DM to get my error

Run in DM to get my error
palmtree5 commented 2018-04-24 00:39:59 +02:00 (Migrated from github.com)

nope, I actually still get my error when running in dm

nope, I actually still get my error when running in dm
palmtree5 commented 2018-04-24 00:42:03 +02:00 (Migrated from github.com)

what's interesting is that I'm only seeing this error when doing [p]help help <insert something here>

what's interesting is that I'm only seeing this error when doing `[p]help help <insert something here>`
bobloy commented 2018-04-24 01:53:50 +02:00 (Migrated from github.com)

You're right, our errors are somewhat different. Maybe it's different per version?
Core error does seem to be with simple_embed though

You're right, our errors are somewhat different. Maybe it's different per version? Core error does seem to be with simple_embed though
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#1554
No description provided.