TypeError with command execution and --help on Python 3.13.0 (TyperArgument.make_metavar() issue) #1216
Unanswered
asq-sheriff
asked this question in
Questions
Replies: 1 comment 1 reply
-
I believe this is a duplicate of #1215 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Hi, I'm encountering a TypeError specifically during the help message generation process when using Typer on Python 3.13.0. This occurs with the latest versions of Typer and Click (obtained via pip install --upgrade).
Interestingly, basic command execution for a minimal application seems to work correctly, but invoking --help or encountering a parsing error in a more complex app (which then tries to display usage) triggers the error.
Operating System
macOS
Operating System Details
15.4.1 (24E263)
Typer Version
Sequoia 15.4.1
Python Version
3.13
Additional Context
I also observed that with a Typer app having multiple commands and options (like the standard examples in the Typer documentation), if I make a mistake invoking a command that leads to a click.exceptions.NoSuchOption error, the subsequent attempt by Typer/Click to format the error message (which includes usage information) also triggers the same TypeError: TyperArgument.make_metavar()
I'm aware that Python 3.13 support has been a focus (e.g., Typer PR #1091), but this specific make_metavar issue during help generation seems to be an edge case with the current library versions on this new Python release.
Could you please let me know if this is a known issue, if there's a known workaround for help generation on Python 3.13, or if more information would be helpful for diagnosis?
Thank you for your work on Typer!
Beta Was this translation helpful? Give feedback.
All reactions