[New-bugs-announce] [issue40804] Bug report in python3.6.8 using argparse module
amansi26
report at bugs.python.org
Thu May 28 06:02:25 EDT 2020
New submission from amansi26 <amansi26 at in.ibm.com>:
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
----------
messages: 370184
nosy: amansi26
priority: normal
severity: normal
status: open
title: Bug report in python3.6.8 using argparse module
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40804>
_______________________________________
More information about the New-bugs-announce
mailing list