ERROR (AttributeError): 'unicode' object has no attribute 'get'

Bug #1587947 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient (Ubuntu)
Confirmed
Medium
Unassigned
Xenial
Confirmed
Medium
Unassigned
Yakkety
Confirmed
Medium
Unassigned

Bug Description

$ nova --debug list
DEBUG (extension:157) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG (extension:157) found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken')
DEBUG (extension:157) found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode')
DEBUG (extension:157) found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password')
DEBUG (extension:157) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG (extension:157) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG (extension:157) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG (extension:157) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG (extension:157) found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG (session:248) REQ: curl -g -i -X GET https://iad2.dream.io:5000/v2.0 -H "Accept: application/json" -H "User-Agent: keystoneauth1/2.4.0 python-requests/2.10.0 CPython/2.7.11+"
INFO (connectionpool:790) Starting new HTTPS connection (1): iad2.dream.io
DEBUG (connectionpool:395) "GET /v2.0 HTTP/1.1" 200 340
DEBUG (session:277) RESP: [200] Date: Wed, 01 Jun 2016 15:10:50 GMT Server: Apache Vary: X-Auth-Token x-openstack-request-id: req-4bde00b2-71da-4330-8b40-7a922f1b8748 Content-Length: 340 Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "https://iad2.dream.io:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2:63) Making authentication request to https://iad2.dream.io:5000/v2.0/tokens
DEBUG (connectionpool:395) "POST /v2.0/tokens HTTP/1.1" 200 2443
DEBUG (session:248) REQ: curl -g -i -X GET https://iad2.dream.io:8774/v2/5332521f01724d928daf57ebbde20872 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}dd45d141aab134bc1500669a82e13733106aa2a7"
INFO (connectionpool:790) Starting new HTTPS connection (1): iad2.dream.io
DEBUG (connectionpool:395) "GET /v2/5332521f01724d928daf57ebbde20872 HTTP/1.1" 404 112
DEBUG (session:277) RESP: [404] Content-Length: 112 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-256881a6-78f7-4870-9923-b5de745afa94 Date: Wed, 01 Jun 2016 15:10:51 GMT
RESP BODY: {"message": "The resource could not be found.<br /><br />\n\n\n", "code": "404 Not Found", "title": "Not Found"}

DEBUG (shell:1082) 'unicode' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 1080, in main
    OpenStackComputeShell().main(argv)
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 914, in main
    api_version = api_versions.discover_version(self.cs, api_version)
  File "/usr/lib/python2.7/dist-packages/novaclient/api_versions.py", line 267, in discover_version
    client)
  File "/usr/lib/python2.7/dist-packages/novaclient/api_versions.py", line 248, in _get_server_version_range
    version = client.versions.get_current()
  File "/usr/lib/python2.7/dist-packages/novaclient/v2/versions.py", line 84, in get_current
    return self._get_current()
  File "/usr/lib/python2.7/dist-packages/novaclient/v2/versions.py", line 57, in _get_current
    return self._get(url, "version")
  File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 339, in _get
    resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 173, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 94, in request
    raise exceptions.from_response(resp, body, url, method)
  File "/usr/lib/python2.7/dist-packages/novaclient/exceptions.py", line 298, in from_response
    message = error.get('message')
AttributeError: 'unicode' object has no attribute 'get'
ERROR (AttributeError): 'unicode' object has no attribute 'get'

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: python-novaclient 2:3.3.1-2
ProcVersionSignature: Ubuntu 4.4.0-23.41-generic 4.4.10
Uname: Linux 4.4.0-23-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Jun 1 11:08:06 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-23 (314 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
PackageArchitecture: all
SourcePackage: python-novaclient
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

See the stacktrace / debug above. The same command and environment works on trusty. Fails on xenial or yakkety.

Revision history for this message
Scott Moser (smoser) wrote :

fix seems to be attached.

Changed in python-novaclient (Ubuntu Xenial):
status: New → Confirmed
Changed in python-novaclient (Ubuntu Yakkety):
status: New → Confirmed
Changed in python-novaclient (Ubuntu Xenial):
importance: Undecided → Medium
Changed in python-novaclient (Ubuntu Yakkety):
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote :

Checked upstream, this was fixed in commit fa377e7fca44e81247639efebd7cae5cb377e57e.
duping this to bug 1559072 .

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.