Argparse”ArgumentError: argument -h/–help: conflicting option string(s): -h, –help”

argparse adds --help and -h options by default. If you don’t want to use the built-in help feature, you need to disable it with:

parser = argparse.ArgumentParser(add_help=False)

See the documentation

Leave a Comment