Recently, I am learning argparse module, Argument error occurred below the code
import argparse
import sys
class ExecuteShell(object):
def create(self, arg
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
The same error pop-ups in 2 other scenarios:
1) Repeated code
parser.add_argument('-h',
'--help',
action='store_true',
help=argparse.SUPPRESS)
parser.add_argument('-h',
'--help',
action='store_true',
help=argparse.SUPPRESS)
2) When you execute the code multiple times on the same kernel
I'm leaving it just in case if someone had simillar problem.