OpenStackShell.build_option_parser() takes 3 positional arguments but 4 were given - 8.3.0

Bug #2137727 reported by tom king
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

After upgrading python-openstackclient to 8.3.0 (plus python-glanceclient python-keystoneclient python-neutronclient python-novaclient python-octaviaclient), any openstack command fails.

Successfully installed cliff-4.13.1 python-glanceclient-4.10.0 python-keystoneclient-5.7.0 python-neutronclient-11.7.0 python-novaclient-18.11.0 python-octaviaclient-3.12.0 python-openstackclient-8.3.0 stevedore-5.6.0

Traceback (most recent call last):
  File "/usr/local/bin/openstack", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/lab/.local/lib/python3.12/site-packages/openstackclient/shell.py", line 175, in main
    return OpenStackShell().run(argv)
           ^^^^^^^^^^^^^^^^
  File "/home/lab/.local/lib/python3.12/site-packages/openstackclient/shell.py", line 46, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/dist-packages/osc_lib/shell.py", line 110, in __init__
    super(OpenStackShell, self).__init__(
  File "/home/lab/.local/lib/python3.12/site-packages/cliff/app.py", line 96, in __init__
    self.parser = self.build_option_parser(description, version)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lab/.local/lib/python3.12/site-packages/openstackclient/shell.py", line 63, in build_option_parser
    parser = super().build_option_parser(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: OpenStackShell.build_option_parser() takes 3 positional arguments but 4 were given

I downgraded back to 8.1.0 which allowed me to use the CLI again.

Revision history for this message
tom king (kingttx) wrote :

Python 3.12.3
Ubuntu 24.04.3 LTS

Successfully installed python-openstackclient-8.1.0
lab@vioimporter:~/vio-cleanup$ openstack
(openstack) exit

Revision history for this message
rjaduthie (rjaduthie) wrote :

I have the same issue.

Rocky Linux 9.6 (Blue Onyx)
Python 3.9.21

I upgraded with `pip`.

Downgrading to 8.2.0 got around the issue: `pip install python-openstackclient==8.2.0`

Revision history for this message
Adam Mizerski (etam1024) wrote :

This is because in openstackclient requirements.txt there is "osc-lib>=2.3.0", but it should be "osc-lib>=4.0.0".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.