votes up 3

No options defined but a name was passed ((param1)). Did you mean to declare an argument instead of an option?

Package:
pipenv
github stars 22232
Exception Class:
TypeError

Raise code

name is None:
            if not expose_value:
                return None, opts, secondary_opts
            raise TypeError("Could not determine name for option")

        if not opts and not secondary_opts:
            raise TypeError(
                "No options defined but a name was passed ({}). Did you"
                " mean to declare an argument instead of an option?".format(name)
            )

        return name, opts, secondary_opts

    def add_to_parser(self, parser, ctx):
        kwar
😲 Agile task management is now easier than calling a taxi. #Tracklify

Ways to fix

votes up 3 votes down

The first argument (which usually refers to the option name) has to begin with "--", so for example it should be "--name" and not "name"

Dec 30, 2021 salimfadhleyhtp answer
votes up 2 votes down

Ensure that you are decorating the function with @click.command and not @click.Command.

Dec 30, 2021 salimfadhleyhtp answer

Add a possible fix

Please authorize to post fix