Bug 1409897 - AttributeError: 'unicode' object has no attribute 'get'
Summary: AttributeError: 'unicode' object has no attribute 'get'
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: openstack-nova
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alan Pevec (Fedora)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-03 19:27 UTC by Seth Jennings
Modified: 2017-12-12 10:17 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:17:20 UTC
Type: Bug


Attachments (Terms of Use)

Description Seth Jennings 2017-01-03 19:27:11 UTC
Description of problem:
$ nova service-list
ERROR (AttributeError): 'unicode' object has no attribute 'get'

Version-Release number of selected component (if applicable):
python2-novaclient-3.3.1-3.fc25.noarch

How reproducible:
Always

Steps to Reproduce:
1. run "nova service-list" against a Newton Openstack cloud
2.
3.

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

Expected results:
No error

Additional info:
https://bugs.launchpad.net/python-novaclient/+bug/1559072

$ nova --debug service-list
DEBUG (extension:157) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG (extension:157) found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1')
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('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password')
DEBUG (extension:157) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG (extension:157) found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken')
DEBUG (extension:157) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG (extension:157) found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos')
DEBUG (extension:157) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG (extension:157) found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials')
DEBUG (extension:157) found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth')
DEBUG (extension:157) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG (extension:157) found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v3:TOTP')
DEBUG (extension:157) found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG (extension:157) found extension EntryPoint.parse('v3fedkerb = keystoneauth1.extras.kerberos._loading:MappedKerberos')
DEBUG (session:337) REQ: curl -g -i -X GET http://openstack.local.variantweb.net:5000/v2.0 -H "Accept: application/json" -H "User-Agent: nova keystoneauth1/2.12.1 python-requests/2.10.0 CPython/2.7.12"
INFO (connectionpool:213) Starting new HTTP connection (1): openstack.local.variantweb.net
DEBUG (connectionpool:395) "GET /v2.0 HTTP/1.1" 200 238
DEBUG (session:366) RESP: [200] Date: Tue, 03 Jan 2017 19:22:30 GMT Server: Apache/2.4.6 (CentOS) Vary: X-Auth-Token,Accept-Encoding x-openstack-request-id: req-6e7b7af0-a89d-4c0b-97ff-d51c13ab8da0 Content-Encoding: gzip Content-Length: 238 Connection: close Content-Type: application/json 
RESP BODY: {"version": {"status": "deprecated", "updated": "2016-08-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://openstack.local.variantweb.net:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2:63) Making authentication request to http://openstack.local.variantweb.net:5000/v2.0/tokens
INFO (connectionpool:248) Resetting dropped connection: openstack.local.variantweb.net
DEBUG (connectionpool:395) "POST /v2.0/tokens HTTP/1.1" 200 995
DEBUG (session:337) REQ: curl -g -i -X GET http://10.42.10.34:8774/v2.1/4458a6ed0fcb45189b808c7af2f8155c -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}2bc87bc590cf2f57bd4010e206942f79658e683b"
INFO (connectionpool:213) Starting new HTTP connection (1): 10.42.10.34
DEBUG (connectionpool:395) "GET /v2.1/4458a6ed0fcb45189b808c7af2f8155c HTTP/1.1" 404 112
DEBUG (session:366) RESP: [404] Content-Length: 112 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-71e97af2-d102-4058-ad8f-481f86d426ee Date: Tue, 03 Jan 2017 19:22:31 GMT Connection: keep-alive 
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/site-packages/novaclient/shell.py", line 1080, in main
    OpenStackComputeShell().main(argv)
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 914, in main
    api_version = api_versions.discover_version(self.cs, api_version)
  File "/usr/lib/python2.7/site-packages/novaclient/api_versions.py", line 267, in discover_version
    client)
  File "/usr/lib/python2.7/site-packages/novaclient/api_versions.py", line 248, in _get_server_version_range
    version = client.versions.get_current()
  File "/usr/lib/python2.7/site-packages/novaclient/v2/versions.py", line 84, in get_current
    return self._get_current()
  File "/usr/lib/python2.7/site-packages/novaclient/v2/versions.py", line 57, in _get_current
    return self._get(url, "version")
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 339, in _get
    resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 187, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 94, in request
    raise exceptions.from_response(resp, body, url, method)
  File "/usr/lib/python2.7/site-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'


Also note that, from the Launchpad bug, other clients (not just nova) need to be updated as well.

Comment 1 Seth Jennings 2017-01-03 19:38:57 UTC
fyi, python-novaclient-6.0.0-2.fc26 in rawhide works.

https://koji.fedoraproject.org/koji/buildinfo?buildID=827570

Can I get updated client packages in F25?

Comment 2 Fedora End Of Life 2017-11-16 18:32:59 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2017-12-12 10:17:20 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.