neutron : 'unicode' object has no attribute 'get'

Bug #1680071 reported by PERRY antoine
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Invalid
Undecided
Unassigned

Bug Description

Hello,

I have a big problem :
When i try the command openstack network list, the shell returns 'unicode' object has no attribute 'get'

openstack network list --debug
.....
Starting new HTTP connection (1): controller
"GET / HTTP/1.1" 200 119
RESP: [200] Content-Type: application/json; charset=UTF-8 Content-Length: 119 Date: Wed, 05 Apr 2017 12:37:24 GMT Connection: keep-alive
RESP BODY: {"versions": [{"status": "CURRENT", "id": "v2.0", "links": [{"href": "http://controller:9696/v2.0/", "rel": "self"}]}]}

Using http://controller:9696/v2.0 as public network endpoint
REQ: curl -g -i -X GET http://controller:9696/v2.0/networks -H "User-Agent: openstacksdk/0.9.13 keystoneauth1/2.18.0 python-requests/2.11.1 CPython/2.7.5" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}63e5a4ed9f495f4a286719331f658f64ab33d02f"
"GET /v2.0/networks HTTP/1.1" 503 170
RESP: [503] Content-Length: 170 Content-Type: application/json; charset=UTF-8 X-Openstack-Request-Id: req-0d4507ed-90a0-442a-a5d1-864578471888 Date: Wed, 05 Apr 2017 12:37:24 GMT Connection: keep-alive
RESP BODY: {"message": "The server is currently unavailable. Please try again at a later time.<br /><br />\n\n\n", "code": "503 Service Unavailable", "title": "Service Unavailable"}

GET call to network for http://controller:9696/v2.0/networks used request id req-0d4507ed-90a0-442a-a5d1-864578471888
Request returned failure status: 503
'unicode' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 113, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/lib/python2.7/site-packages/cliff/lister.py", line 53, in produce_output
    parsed_args,
  File "/usr/lib/python2.7/site-packages/cliff/formatters/table.py", line 92, in emit_list
    self.add_rows(x, column_names, data)
  File "/usr/lib/python2.7/site-packages/cliff/formatters/table.py", line 71, in add_rows
    first_row = next(data_iter)
  File "/usr/lib/python2.7/site-packages/openstackclient/network/v2/network.py", line 516, in <genexpr>
    (utils.get_item_properties(
  File "/usr/lib/python2.7/site-packages/openstack/resource2.py", line 728, in list
    params=query_params)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 758, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/openstack/session.py", line 66, in map_exceptions_wrapper
    raise exceptions.from_exception(e)
  File "/usr/lib/python2.7/site-packages/openstack/exceptions.py", line 128, in from_exception
    messages = [obj.get('message') for obj in resp.json().values()]
AttributeError: 'unicode' object has no attribute 'get'
clean_up ListNetwork: 'unicode' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 113, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/lib/python2.7/site-packages/cliff/lister.py", line 53, in produce_output
    parsed_args,
  File "/usr/lib/python2.7/site-packages/cliff/formatters/table.py", line 92, in emit_list
    self.add_rows(x, column_names, data)
  File "/usr/lib/python2.7/site-packages/cliff/formatters/table.py", line 71, in add_rows
    first_row = next(data_iter)
  File "/usr/lib/python2.7/site-packages/openstackclient/network/v2/network.py", line 516, in <genexpr>
    (utils.get_item_properties(
  File "/usr/lib/python2.7/site-packages/openstack/resource2.py", line 728, in list
    params=query_params)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 758, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/openstack/session.py", line 66, in map_exceptions_wrapper
    raise exceptions.from_exception(e)
  File "/usr/lib/python2.7/site-packages/openstack/exceptions.py", line 128, in from_exception
    messages = [obj.get('message') for obj in resp.json().values()]
AttributeError: 'unicode' object has no attribute 'get'

END return value: 1

but command openstack flavor list returns good value.

Thanks!!

Tags: neutron nova
Revision history for this message
PERRY antoine (antoinep88) wrote :

Please help me !!
I use haproxy to balance with 2 controllers..

Revision history for this message
Alexandra Settle (alexandra-settle) wrote :

Hi Perry,

This is a troubleshooting or support issue. This is a bug reporting system for the documentation. Please use the following resources to get help with your question:

 - Ask OpenStack: http://ask.openstack.org
 - The mailing list: http://lists.openstack.org
 - IRC: 'openstack' channel on Freenode

Changed in openstack-manuals:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.