I have a program in python 2.7, which has a line of code:
parser.add_argument('--skip_train', default=False, help='skip training', action='store_true')
This code tells the program to run with training by default. But now I want to implement it without training since the training has been done. So I type in the prompt:
python myprogame.py --skip_train True
But this gives an error message:
error: unrecognized arguments: True
What should type in the prompt command to implement the program?
When you use action='store_true', you shouldn't provide a value for the --skip_train option. Just do:
python myprogame.py --skip_train
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With