`openstack --help` exits with an internal error

Bug #1662234 reported by KeithJ
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Confirmed
Undecided
Unassigned

Bug Description

From a virtualenv of Python 2.7.10, using python-openstackclient 3.8.1 installed
using pip.

$ openstack --help
'Namespace' object has no attribute 'url'

$ openstack --help --debug
START with options: [u'--help', u'--debug']
options: Namespace(auth_type='', cacert=None, cert='', cloud='', debug=True, default_domain='default', deferred_help=True, insecure=None, interface='', key='', log_file=None, os_beta_command=False, os_project_id=None, os_project_name=None, region_name='', timing=False, verbose_level=3, verify=None)
'Namespace' object has no attribute 'url'
Traceback (most recent call last):
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/cliff/app.py", line 262, in run
    self.initialize_app(remainder)
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/openstackclient/shell.py", line 135, in initialize_app
    super(OpenStackShell, self).initialize_app(argv)
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/osc_lib/shell.py", line 378, in initialize_app
    self._final_defaults()
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/openstackclient/shell.py", line 65, in _final_defaults
    if (self.options.url and self.options.token):
AttributeError: 'Namespace' object has no attribute 'url'
Traceback (most recent call last):
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/cliff/app.py", line 262, in run
    self.initialize_app(remainder)
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/openstackclient/shell.py", line 135, in initialize_app
    super(OpenStackShell, self).initialize_app(argv)
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/osc_lib/shell.py", line 378, in initialize_app
    self._final_defaults()
  File "/nfs/users/nfs_k/kdj/.virtualenvs/devel/lib/python2.7/site-packages/openstackclient/shell.py", line 65, in _final_defaults
    if (self.options.url and self.options.token):
AttributeError: 'Namespace' object has no attribute 'url'

pip list:

appdirs (1.4.0)
Babel (2.3.4)
cliff (2.4.0)
cmd2 (0.6.9)
debtcollector (1.11.0)
distribute (0.6.24)
funcsigs (1.0.2)
functools32 (3.2.3.post2)
iso8601 (0.1.11)
jsonpatch (1.15)
jsonpointer (1.10)
jsonschema (2.5.1)
keystoneauth1 (2.18.0)
monotonic (1.2)
msgpack-python (0.4.8)
netaddr (0.7.19)
netifaces (0.10.5)
openstacksdk (0.9.13)
os-client-config (1.26.0)
osc-lib (1.3.0)
oslo.config (3.22.0)
oslo.i18n (3.12.0)
oslo.serialization (2.16.0)
oslo.utils (3.22.0)
packaging (16.8)
pbr (1.10.0)
pip (9.0.1)
positional (1.1.1)
prettytable (0.7.2)
pyparsing (2.1.10)
python-cinderclient (1.11.0)
python-glanceclient (2.6.0)
python-keystoneclient (3.10.0)
python-novaclient (7.1.0)
python-openstackclient (3.8.1)
pytz (2016.10)
PyYAML (3.12)
requests (2.13.0)
requestsexceptions (1.1.3)
rfc3986 (0.4.1)
setuptools (34.1.0)
simplejson (3.10.0)
six (1.10.0)
stevedore (1.20.0)
unicodecsv (0.14.1)
warlock (1.2.0)
wrapt (1.10.8)

The CLI options do not have a 'url' or 'token' attribute defined. Adding a dummy
'url' option to the args parser in osc_lib allowed the client program to run.

Revision history for this message
Dean Troyer (dtroyer) wrote :

Was any authentication information set in the environment or via clouds.yaml?

Is this still an issue with the current release or master? We've made a series of changes to auth chasing down issues similar to this and the error may have changed or gone away by now.

Changed in python-openstackclient:
status: New → Incomplete
Revision history for this message
Atmesh (atmesh-mishra) wrote :

I have installed python-openstackclient 3.12.0, it is giving me the same error. I used environment variables on macOS to set auth info.

Changed in python-openstackclient:
status: Incomplete → Confirmed
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.