GSTT-CSC / GSTT-CSC/project-template
argparse argument can't have 'type' and "action='store_true'"
- Dominant language
- Python
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
When running:
python run_project.py --help
I get the error:
```
Traceback (most recent call last):
File "run_project.py", line 21, in
help='use localhost flag')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1353, in add_argument
action = action_class(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'type'
```
Looking at the accepted answer on StackOverflow here: https://stackoverflow.com/a/33574480 (and the comment underneath) it seems that the documentation for argparse is misleading and you can't in fact have store_true and type in the same arg.
Deleting `type` for the `-l `argument seems to work.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.