Skip to content

TypeError - <argument/option name> is defined twice #834

Discussion options

You must be logged in to vote

Try removing the “default” values from typer.Option(). It should help.

@solr_app.command("download")
def download(
    version: Annotated[
        str,
        typer.Option(
            "--version",
            help="The version of the Solr KG to download (latest, dev, or a specific version)",
        ),
    ] = "latest",
    overwrite: Annotated[
        bool,
        typer.Option(
            "--overwrite",
            help="Overwrite the existing Solr KG if it exists",
        ),
    ] = False,
):

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@justanotherbody
Comment options

Answer selected by glass-ships
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
5 participants