ERROR: openstack 'ArgumentParser' object has no attribute 'debug'

Bug #1459519 reported by Christian Berendt
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
cliff
Fix Released
Undecided
Terry Howe
python-openstackclient
Fix Released
Medium
Steve Martinelli

Bug Description

After installation the latest released python-openstackclient package from pypi (version 1.30) in a fresh virtual environment I got the following issue when trying to run 'openstack --help':

Commands:
Could not load EntryPoint.parse('aggregate_add_host = openstackclient.compute.v2.aggregate:AddAggregateHost')
ERROR: openstack 'ArgumentParser' object has no attribute 'debug'

Revision history for this message
Chenhong Liu (liuchenhong) wrote :

This bug affects me, too. I tested it on two different os, which fine with previous version, a.k.a 1.2.0

Changed in python-openstackclient:
assignee: nobody → Chenhong Liu (liuchenhong)
status: New → Confirmed
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Terry Howe (thowe-g) wrote :

The "object has no attribute 'debug'" is kind of unrelated to the load problem.

Changed in python-cliff:
status: New → Confirmed
assignee: nobody → Terry Howe (thowe-g)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cliff (master)

Fix proposed to branch: master
Review: https://review.openstack.org/186394

Changed in python-cliff:
status: Confirmed → In Progress
Revision history for this message
Terry Howe (thowe-g) wrote :

Stack trace for what Chenhong is looking at:

Could not load EntryPoint.parse('aggregate_add_host = openstackclient.compute.v2
.aggregate:AddAggregateHost')
Traceback (most recent call last):
  File "/home/terry/cliff/cliff/help.py", line 22, in __call__
    factory = ep.load()
  File "/home/terry/.venv/local/lib/python2.7/site-packages/pkg_resources/__init
__.py", line 2344, in load
    self.require(*args, **kwargs)
  File "/home/terry/.venv/local/lib/python2.7/site-packages/pkg_resources/__init
__.py", line 2361, in require
    items = working_set.resolve(reqs, env, installer)
  File "/home/terry/.venv/local/lib/python2.7/site-packages/pkg_resources/__init
__.py", line 838, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (pbr 1.0.1 (/home/terry/.venv/lib/python2.7/site-pack
ages), Requirement.parse('pbr!=0.7,<1.0,>=0.6'), set(['oslo.i18n', 'python-keyst
oneclient', 'oslo.utils', 'oslo.config', 'python-neutronclient', 'stevedore', 'o
slo.serialization', 'python-glanceclient', 'python-cinderclient']))

Revision history for this message
Terry Howe (thowe-g) wrote :

https://github.com/openstack/python-openstackclient/commit/0816cd79d47f16f24555fd5812abdc6f5f41287d

For some reason, the rest of those packages never updated requirements.txt for pbr. Perhaps the fix would be to revert the above change if that is possible.

Changed in python-openstackclient:
assignee: Chenhong Liu (liuchenhong) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cliff (master)

Reviewed: https://review.openstack.org/186394
Committed: https://git.openstack.org/cgit/openstack/cliff/commit/?id=8a4a93fe268a59fa1fe7856c059507e3524d219b
Submitter: Jenkins
Branch: master

commit 8a4a93fe268a59fa1fe7856c059507e3524d219b
Author: TerryHowe <email address hidden>
Date: Thu May 28 07:55:11 2015 -0600

    Fix object has no attribute debug error

    When print_help_if_requested is called, if there is an error,
    "object has no attribute 'debug'" gets printed out. This is
    because the parser is passed in to the command rather than the
    parsed arguments.

    Change-Id: I1863421eff82b3f493d276432369ada9f783b165
    Partial-Bug: #1459519

Revision history for this message
Matt Riedemann (mriedem) wrote :

The cliff fix is in release 1.13.0.

I've proposed a bump to global-requirements so that we pull cliff 1.13.0 into python-openstackclient:

https://review.openstack.org/#/c/192848/

Changed in python-cliff:
status: In Progress → Fix Released
Revision history for this message
Steve Martinelli (stevemar) wrote :

OSC master branch now depends on cliff>1.13.0 https://github.com/openstack/python-openstackclient/blob/master/requirements.txt

it's latest release 1.5.0 depend on cliff>1.10.0 https://github.com/openstack/python-openstackclient/blob/1.5.0/requirements.txt

so i'm marking this as fix committed, when we release 1.6.0 i'll mark this as fix released

Changed in python-openstackclient:
status: Confirmed → Fix Committed
importance: Undecided → Medium
assignee: nobody → Steve Martinelli (stevemar)
Revision history for this message
Jakub Ružička (jruzicka) wrote :

$ openstack help
...
ERROR: openstack 'ArgumentParser' object has no attribute 'debug'

This still happens to me with os master and pip installed cliff 1.13.0

Revision history for this message
Przemek Czerkas (pczerkas) wrote :

For python-openstackclient 1.0.1 downgrading debtcollector to 0.5.0 helps (from 0.7.0 version).

Changed in python-openstackclient:
milestone: none → 1.6.0
status: Fix Committed → Fix Released
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.