Skip to content

AttributeError: 'ArgumentParser' object has no attribute 'title' #128205

Description

@khalfella

Bug report

Bug description:

    some_parser = subparsers.add_parser('something',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/argparse.py", line 1236, in add_parser
    parser = self._parser_class(**kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/argparse.py", line 1827, in __init__
    self._add_container_actions(parent)
  File "/usr/lib/python3.12/argparse.py", line 1568, in _add_container_actions
    cont = title_group_map[group._container.title]
                           ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ArgumentParser' object has no attribute 'title'

After updating to latest python version on gentoo Python 3.12.8 I started seeing this failure. This might be related to fix in GH-125210. Manually reverting this change fixed the issue for me.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directory

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions