Message370184
I am using 3.6.8 version of python.
I am seeing an error as AttributeError: 'Namespace' object has no attribute 'func' while using argparse . The code is working fine with python2.7 argparser.
I see a similar bug [4] reported at python 3.3 and python3.4. The workaround mentioned works fine for a single level command.
Scenarios:
- If there is one command and various subcommands, like [1].The solution works fine.
- But suppose I have a command with mutiple level of subcommands like [2]. In this case if I give [3] as a command the ArgumentParser.prog() takes just the first command as input in this
case (open-stack). Hence the parser.print_usage prints [1].
[1] [2] [3] https://bpa.st/PUPA
[4] https://bugs.python.org/issue16308 |
|
Date |
User |
Action |
Args |
2020-05-28 10:02:25 | amansi26 | set | recipients:
+ amansi26 |
2020-05-28 10:02:25 | amansi26 | set | messageid: <1590660145.62.0.878153960448.issue40804@roundup.psfhosted.org> |
2020-05-28 10:02:25 | amansi26 | link | issue40804 messages |
2020-05-28 10:02:25 | amansi26 | create | |
|