Running on Ubuntu 14.04.
After installing nova from source in either the Liberty release or Mitaka, with WebOb 1.6.0, running any nova command generated this error:
root@openstack-ubu-controller:~# nova service-list
ERROR (AttributeError): 'unicode' object has no attribute 'get'
The equivalent openstack commands work correctly. After downgrading WebOb to 1.5.1 AND restarting the nova-api service everything works.
Detailed output from nova -debug service-list with the error:
DEBUG (v2:63) Making authentication request to http://10.0.1.3:5000/v2.0/tokens
DEBUG (connectionpool:387) "POST /v2.0/tokens HTTP/1.1" 200 2465
DEBUG (session:248) REQ: curl -g -i -X GET http://10.0.1.3:8774/v1.1/b77d640e127e488fb42a7c0716ba53a5 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}381893576ad46c62b587f4963d769b89441b919a"
INFO (connectionpool:207) Starting new HTTP connection (1): 10.0.1.3
DEBUG (connectionpool:387) "GET /v1.1/b77d640e127e488fb42a7c0716ba53a5 HTTP/1.1" 404 112
DEBUG (session:277) RESP: [404] Date: Fri, 18 Mar 2016 12:41:59 GMT Connection: keep-alive Content-Type: application/json; charset=UTF-8 Content-Length: 112 X-Compute-Request-Id: req-f10a2016-9a88-48fd-af1d-5f800fc9e11a
RESP BODY: {"message": "The resource could not be found.<br /><br />\n\n\n", "code": "404 Not Found", "title": "Not Found"}
DEBUG (shell:894) 'unicode' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 892, in main
OpenStackComputeShell().main(argv)
File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 726, in main
api_version = api_versions.discover_version(self.cs, api_version)
File "/usr/local/lib/python2.7/dist-packages/novaclient/api_versions.py", line 267, in discover_version
client)
File "/usr/local/lib/python2.7/dist-packages/novaclient/api_versions.py", line 248, in _get_server_version_range
version = client.versions.get_current()
File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/versions.py", line 83, in get_current
return self._get_current()
File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/versions.py", line 57, in _get_current
return self._get(url, "version")
File "/usr/local/lib/python2.7/dist-packages/novaclient/base.py", line 297, in _get
_resp, body = self.api.client.get(url)
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 173, in get
return self.request(url, 'GET', **kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 92, in request
raise exceptions.from_response(resp, body, url, method)
File "/usr/local/lib/python2.7/dist-packages/novaclient/exceptions.py", line 274, in from_response
message = error.get('message')
AttributeError: 'unicode' object has no attribute 'get'
ERROR (AttributeError): 'unicode' object has no attribute 'get'
Since nova-api must be restarted for this to either take effect or go away (with the WebOb downgrade) this appears to be an issue with the nova-api process. The failing message from the api service is 112 bytes long while the successful one (using downgraded WebOb) is 52 bytes long.
Running on Ubuntu 14.04. ubu-controller: ~# nova service-list
After installing nova from source in either the Liberty release or Mitaka, with WebOb 1.6.0, running any nova command generated this error:
root@openstack-
ERROR (AttributeError): 'unicode' object has no attribute 'get'
The equivalent openstack commands work correctly. After downgrading WebOb to 1.5.1 AND restarting the nova-api service everything works.
Detailed output from nova -debug service-list with the error:
root@openstack- ubu-controller: ~# nova --debug service-list parse(' v2token = keystoneauth1. loading. _plugins. identity. v2:Token' ) parse(' admin_token = keystoneauth1. loading. _plugins. admin_token: AdminToken' ) parse(' v3oidcauthcode = keystoneauth1. loading. _plugins. identity. v3:OpenIDConnec tAuthorizationC ode') parse(' v2password = keystoneauth1. loading. _plugins. identity. v2:Password' ) parse(' v3password = keystoneauth1. loading. _plugins. identity. v3:Password' ) parse(' v3oidcpassword = keystoneauth1. loading. _plugins. identity. v3:OpenIDConnec tPassword' ) parse(' token = keystoneauth1. loading. _plugins. identity. generic: Token') parse(' v3token = keystoneauth1. loading. _plugins. identity. v3:Token' ) parse(' password = keystoneauth1. loading. _plugins. identity. generic: Password' ) 10.0.1. 3:5000/ v2.0 -H "Accept: application/json" -H "User-Agent: keystoneauth1/2.3.0 python- requests/ 2.9.1 CPython/2.7.6" :207) Starting new HTTP connection (1): 10.0.1.3 :387) "GET /v2.0 HTTP/1.1" 200 334 request- id: req-a0c68cd5- ea29-4391- 942f-130cc69d15 f8 17T00:00: 00Z", "media-types": [{"base": "application/json", "type": "application/ vnd.openstack. identity- v2.0+json" }], "id": "v2.0", "links": [{"href": "http:// 10.0.1. 3:5000/ v2.0/", "rel": "self"}, {"href": "http:// docs.openstack. org/", "type": "text/html", "rel": "describedby"}]}}
DEBUG (extension:157) found extension EntryPoint.
DEBUG (extension:157) found extension EntryPoint.
DEBUG (extension:157) found extension EntryPoint.
DEBUG (extension:157) found extension EntryPoint.
DEBUG (extension:157) found extension EntryPoint.
DEBUG (extension:157) found extension EntryPoint.
DEBUG (extension:157) found extension EntryPoint.
DEBUG (extension:157) found extension EntryPoint.
DEBUG (extension:157) found extension EntryPoint.
DEBUG (session:248) REQ: curl -g -i -X GET http://
INFO (connectionpool
DEBUG (connectionpool
DEBUG (session:277) RESP: [200] Content-Length: 334 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.7 (Ubuntu) Connection: Keep-Alive Date: Fri, 18 Mar 2016 12:41:58 GMT Content-Type: application/json x-openstack-
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-
DEBUG (v2:63) Making authentication request to http:// 10.0.1. 3:5000/ v2.0/tokens :387) "POST /v2.0/tokens HTTP/1.1" 200 2465 10.0.1. 3:8774/ v1.1/b77d640e12 7e488fb42a7c071 6ba53a5 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}381893576 ad46c62b587f496 3d769b89441b919 a" :207) Starting new HTTP connection (1): 10.0.1.3 :387) "GET /v1.1/b77d640e1 27e488fb42a7c07 16ba53a5 HTTP/1.1" 404 112 Request- Id: req-f10a2016- 9a88-48fd- af1d-5f800fc9e1 1a
DEBUG (connectionpool
DEBUG (session:248) REQ: curl -g -i -X GET http://
INFO (connectionpool
DEBUG (connectionpool
DEBUG (session:277) RESP: [404] Date: Fri, 18 Mar 2016 12:41:59 GMT Connection: keep-alive Content-Type: application/json; charset=UTF-8 Content-Length: 112 X-Compute-
RESP BODY: {"message": "The resource could not be found.<br /><br />\n\n\n", "code": "404 Not Found", "title": "Not Found"}
DEBUG (shell:894) 'unicode' object has no attribute 'get' lib/python2. 7/dist- packages/ novaclient/ shell.py" , line 892, in main mputeShell( ).main( argv) lib/python2. 7/dist- packages/ novaclient/ shell.py" , line 726, in main discover_ version( self.cs, api_version) lib/python2. 7/dist- packages/ novaclient/ api_versions. py", line 267, in discover_version lib/python2. 7/dist- packages/ novaclient/ api_versions. py", line 248, in _get_server_ version_ range versions. get_current( ) lib/python2. 7/dist- packages/ novaclient/ v2/versions. py", line 83, in get_current lib/python2. 7/dist- packages/ novaclient/ v2/versions. py", line 57, in _get_current lib/python2. 7/dist- packages/ novaclient/ base.py" , line 297, in _get client. get(url) lib/python2. 7/dist- packages/ keystoneauth1/ adapter. py", line 173, in get lib/python2. 7/dist- packages/ novaclient/ client. py", line 92, in request from_response( resp, body, url, method) lib/python2. 7/dist- packages/ novaclient/ exceptions. py", line 274, in from_response 'message' )
Traceback (most recent call last):
File "/usr/local/
OpenStackCo
File "/usr/local/
api_version = api_versions.
File "/usr/local/
client)
File "/usr/local/
version = client.
File "/usr/local/
return self._get_current()
File "/usr/local/
return self._get(url, "version")
File "/usr/local/
_resp, body = self.api.
File "/usr/local/
return self.request(url, 'GET', **kwargs)
File "/usr/local/
raise exceptions.
File "/usr/local/
message = error.get(
AttributeError: 'unicode' object has no attribute 'get'
ERROR (AttributeError): 'unicode' object has no attribute 'get'
Since nova-api must be restarted for this to either take effect or go away (with the WebOb downgrade) this appears to be an issue with the nova-api process. The failing message from the api service is 112 bytes long while the successful one (using downgraded WebOb) is 52 bytes long.