This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author talkless
Recipients bethard, louielu, paul.j3, pitrou, talkless, wolma
Date 2017-12-06.17:58:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <c72d0486-3903-d360-1d45-ad6252d23497@gmail.com>
In-reply-to <1512582190.63.0.213398074469.issue18943@psf.upfronthosting.co.za>
Content
On 2017-12-06 19:43, paul j3 wrote:
> With one flag but not its argument, I get the error that you display.  That has nothing to do with the grouping.
> 
> 0932:~/mypy/argdev$ python3 issue18943.py --ptz-get-status
> usage: issue18943.py [-h]
>                       (--device-get-capabilities | --ptz-absolute-move x y z | --ptz-get-status MEDIA_PROFILE)
> issue18943.py: error: argument --ptz-get-status: expected one argument

In my example I pasted, I had hardcoded arguments:

```
pprint.pprint(parser.parse_args(['--ptz-get-status']))
``

I expected `python myscript.py --ptz-get-status` to work, because default value is set.

I do not compute that "With one flag but not its argument", sorry. It has default argument set, shoudn't that work?

Thanks!
History
Date User Action Args
2017-12-06 17:58:07talklesssetrecipients: + talkless, pitrou, bethard, paul.j3, wolma, louielu
2017-12-06 17:58:07talklesslinkissue18943 messages
2017-12-06 17:58:07talklesscreate