Skip to content

TypeError: type 'Choice' is not subscriptable #13350

@GrLoopBack

Description

@GrLoopBack

Custom Node Testing

Expected Behavior

comfy launch --disable-all-custom-nodes

Traceback (most recent call last):
  File "/home/blah/stuff/comfy-env/bin/comfy", line 5, in <module>
    from comfy_cli.__main__ import main
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/comfy_cli/__main__.py", line 1, in <module>
    from comfy_cli.cmdline import main
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/comfy_cli/cmdline.py", line 8, in <module>
    import typer
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/__init__.py", line 29, in <module>
    from .main import Typer as Typer
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/main.py", line 20, in <module>
    from typer._types import TyperChoice
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/_types.py", line 9, in <module>
    class TyperChoice(click.Choice[ParamTypeValue]):
                      ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
TypeError: type 'Choice' is not subscriptable

it worked fine yesterday.

Actual Behavior

Cant start comfy. Throws the error and nothing else.

Steps to Reproduce

python3 -m venv comfy-env && source comfy-env/bin/activate && comfy launch

Debug Logs

comfy launch -- --disable-cuda-malloc --use-sage-attention --disable-all-custom-nodes
Traceback (most recent call last):
  File "/home/blah/stuff/comfy-env/bin/comfy", line 5, in <module>
    from comfy_cli.__main__ import main
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/comfy_cli/__main__.py", line 1, in <module>
    from comfy_cli.cmdline import main
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/comfy_cli/cmdline.py", line 8, in <module>
    import typer
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/__init__.py", line 29, in <module>
    from .main import Typer as Typer
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/main.py", line 20, in <module>
    from typer._types import TyperChoice
  File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/_types.py", line 9, in <module>
    class TyperChoice(click.Choice[ParamTypeValue]):
                      ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
TypeError: type 'Choice' is not subscriptable

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Potential BugUser is reporting a bug. This should be tested.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions