8000 Fails to output help with error: `TypeError: Parameter.make_metavar() missing 1 required positional argument: 'ctx'` · Issue #264 · Comfy-Org/comfy-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Fails to output help with error: TypeError: Parameter.make_metavar() missing 1 required positional argument: 'ctx' #264
Open
@polarathene

Description

@polarathene

Describe the bug

I have tried to install Comfy CLI via pip package and via cloning this repo. Basic functionality to get a help output is failing.

Seems to be similar to this issue where typer version broke installs in May 2024.

To Reproduce

# Using either Ubuntu or Fedora:
$ docker run --rm -it --env DEBIAN_FRONTEND=noninteractive ubuntu:24.04
$ apt-get -qq update && apt-get -qq install pipx git
$ python3 --version
Python 3.12.3


$ docker run --rm -it fedora:42
$ dnf install -yq pipx git-core
$ python --version
Python 3.13.3

$ pipx install comfy-cli

There are 3 different commands to output help (comfy-cli, comfy-cli help, comfy-cli --help) that all have different Traceback failures but output the same error at the end:

TypeError: Parameter.make_metavar() missing 1 required positional argument: 'ctx'
CLI outputs with errors/tracebacks
$ comfy-cli

warn: The recent workspace None is not a valid ComfyUI path.
Welcome to Comfy CLI!: https://github.com/Comfy-Org/comfy-cli

 Usage: comfy-cli [OPTIONS] COMMAND [ARGS]...

╭───────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────────────────╮
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/comfy_cli/cmdline.py:129 in entry                                                                                                            │
│                                                                                                                                                                                                                     │
│   126 │                                                                                        ╭───────────────────────────── locals ─────────────────────────────╮                                                 │
│   127 │   if ctx.invoked_subcommand is None:                                                   │              ctx = <click.core.Context object at 0x7ff7e0e29160> │                                                 │
│   128 │   │   rprint("[bold yellow]Welcome to Comfy CLI![/bold yellow]: https://github.com/Com │ enable_telemetry = False                                         │                                                 │
│ ❱ 129 │   │   rprint(ctx.get_help())                                                           │             here = None                                          │                                                 │
│   130 │   │   ctx.exit()                                                                       │           recent = None                                          │                                                 │
│   131 │                                                                                        │      skip_prompt = False                                         │                                                 │
│   132 │   # TODO: Move this to proper place                                                    │          version = False                                         │                                                 │
│                                                                                                │        workspace = None                                          │                                                 │
│                                                                                                ╰──────────────────────────────────────────────────────────────────╯                                                 │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:730 in get_help                                                                                                                │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:1064 in get_help                                                                                                               │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/core.py:754 in format_help                                                                                                             │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/rich_utils.py:614 in rich_format_help                                                                                                  │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/rich_utils.py:373 in _print_options_panel                                                                                              │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Parameter.make_metavar() missing 1 required positional argument: 'ctx'
$ comfy-cli help

warn: The recent workspace None is not a valid ComfyUI path.

 Usage: comfy-cli [OPTIONS] COMMAND [ARGS]...

╭───────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────────────────╮
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/comfy_cli/cmdline.py:61 in help                                                                                                              │
│                                                                                                                                                                                                                     │
│    58                                                                                          ╭────────────────────── locals ───────────────────────╮                                                              │
│    59 @app.command(help="Display help for commands")                                           │ ctx = <click.core.Context object at 0x7f9442471310> │                                                              │
│    60 def help(ctx: typer.Context):                                                            ╰─────────────────────────────────────────────────────╯                                                              │
│ ❱  61 │   rprint(ctx.find_root().get_help())                                                                                                                                                                        │
│    62 │   ctx.exit(0)                                                                                                                                                                                               │
│    63                                                                                                                                                                                                               │
│    64                                                                                                                                                                                                               │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:730 in get_help                                                                                                                │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:1064 in get_help                                                                                                               │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/core.py:754 in format_help                                                                                                             │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/rich_utils.py:614 in rich_format_help                                                                                                  │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/rich_utils.py:373 in _print_options_panel                                                                                              │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Parameter.make_metavar() missing 1 required positional argument: 'ctx'
$ comfy-cli --help

 Usage: comfy-cli [OPTIONS] COMMAND [ARGS]...

╭───────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────────────────╮
│ /root/.local/bin/comfy-cli:8 in <module>                                                                                                                                                                            │
│                                                                                                                                                                                                                     │
│   5 from comfy_cli.__main__ import main                                                      ╭──────────────────────────── locals ─────────────────────────────╮                                                    │
│   6 if __name__ == '__main__':                                                               │  re = <module 're' from '/usr/lib64/python3.13/re/__init__.py'> │                                                    │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                     │ sys = <module 'sys' (built-in)>                                 │                                                    │
│ ❱ 8 │   sys.exit(main())                                                                     ╰─────────────────────────────────────────────────────────────────╯                                                    │
│   9                                                                                                                                                                                                                 │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/comfy_cli/cmdline.py:36 in main                                                                                                              │
│                                                                                                                                                                                                                     │
│    33                                                                                                                                                                                                               │
│    34                                                                                                                                                                                                               │
│    35 def main():                                                                                                                                                                                                   │
│ ❱  36 │   app()                                                                                                                                                                                                     │
│    37                                                                                                                                                                                                               │
│    38                                                                                                                                                                                                               │
│    39 class MutuallyExclusiveValidator:                                                                                                                                                                             │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/main.py:340 in __call__                                                                                                                │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/main.py:323 in __call__                                                                                                                │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:1442 in __call__                                                                                                               │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/core.py:740 in main                                                                                                                    │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/core.py:194 in _main                                                                                                                   │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:1186 in make_context                                                                                                           │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:1786 in parse_args                                                                                                             │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:1197 in parse_args                                                                                                             │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:2416 in handle_parse_result                                                                                                    │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:2355 in process_value                                                                                                          │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/decorators.py:539 in show_help                                                                                                         │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:730 in get_help                                                                                                                │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/click/core.py:1064 in get_help                                                                                                               │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/core.py:754 in format_help                                                                                                             │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/rich_utils.py:614 in rich_format_help                                                                                                  │
│                                                                                                                                                                                                                     │
│ /root/.local/share/pipx/venvs/comfy-cli/lib64/python3.13/site-packages/typer/rich_utils.py:373 in _print_options_panel                                                                                              │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Parameter.make_metavar() missing 1 required positional argument: 'ctx'

Expected behavior

No error output, I should see the expected help output for using the CLI tool.

Nice to have

  • Terminal output
  • Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0