Skip to content

"Type not yet supported" when running pyodide-build 0.29.3 #163

@iFreilicht

Description

@iFreilicht

I just tried to explore the CLI after installing pyodide-build from pypi:

pyodide --version
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/bin/pyodide:8 in <module>                  │
│                                                                                                  │
│   5 from pyodide_cli.__main__ import main                                                        │
│   6 if __name__ == "__main__":                                                                   │
│   7 │   sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])                         │
│ ❱ 8 │   sys.exit(main())                                                                         │
│   9                                                                                              │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/pyodide_cli/a │
│ pp.py:85 in main                                                                                 │
│                                                                                                  │
│   82                                                                                             │
│   83 def main():                                                                                 │
│   84 │   register_plugins()                                                                      │
│ ❱ 85 │   app()                                                                                   │
│   86                                                                                             │
│   87                                                                                             │
│   88 if "sphinx" in sys.modules and __name__ != "__main__":                                      │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :328 in __call__                                                                                 │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :311 in __call__                                                                                 │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :350 in get_command                                                                              │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :332 in get_group                                                                                │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :491 in get_group_from_info                                                                      │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :483 in get_group_from_info                                                                      │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :577 in get_command_from_info                                                                    │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :553 in get_params_convertors_ctx_param_name_from_function                                       │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :850 in get_click_param                                                                          │
│                                                                                                  │
│ /Users/feuh/repos/Netlight/Viridium/rr_plus_poc/.venv/lib/python3.12/site-packages/typer/main.py │
│ :779 in get_click_type                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Type not yet supported: str | None

When I downgrade to 0.29.2, it works, though it displays the wrong version:

pyodide --version
Pyodide CLI Version: 0.2.4

It seems this might be fixable by upgrading typer: fastapi/typer#548

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions