Ask Your Question
0

I got error when Building sahara UI

asked 2014-07-29 04:24:57 -0600

BetterFly gravatar image

I have created RDO and builded sahara UI follow http://docs.openstack.org/developer/sahara/horizon/installation.guide.html (this)

Now I got an error,it's said ValueError at /sahara/ No JSON object could be decoded

Did anyone know how to solve?


Here is my error message

Environment:

Request Method: GET Request URL: http://140.115.187.151/dashboard/sahara/

Django Version: 1.4.13 Python Version: 2.6.6 Installed Applications: ['openstack_dashboard.dashboards.project', 'openstack_dashboard.dashboards.admin', 'openstack_dashboard.dashboards.settings', 'openstack_dashboard', 'django.contrib.contenttypes', 'django.contrib.auth', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'compressor', 'horizon', 'openstack_auth', 'saharadashboard'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'horizon.middleware.HorizonMiddleware', 'django.middleware.doc.XViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback: File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response 109. response = callback(request, callback_args, *callback_kwargs) File "/usr/lib/python2.6/site-packages/horizon/decorators.py" in dec 38. return view_func(request, args, *kwargs) File "/usr/lib/python2.6/site-packages/horizon/decorators.py" in dec 54. return view_func(request, args, *kwargs) File "/usr/lib/python2.6/site-packages/horizon/decorators.py" in dec 38. return view_func(request, args, *kwargs) File "/usr/lib/python2.6/site-packages/django/views/generic/base.py" in view 48. return self.dispatch(request, args, *kwargs) File "/usr/lib/python2.6/site-packages/django/views/generic/base.py" in dispatch 69. return handler(request, args, *kwargs) File "/usr/lib/python2.6/site-packages/horizon/tables/views.py" in get 154. handled = self.construct_tables() File "/usr/lib/python2.6/site-packages/horizon/tables/views.py" in construct_tables 145. handled = self.handle_table(table) File "/usr/lib/python2.6/site-packages/horizon/tables/views.py" in handle_table 118. data = self._get_data_dict() File "/usr/lib/python2.6/site-packages/horizon/tables/views.py" in _get_data_dict 181. self._data = {self.table_class._meta.name: self.get_data()} File "/usr/lib/python2.6/site-packages/saharadashboard/clusters/views.py" in get_data 38. clusters = sahara.clusters.list() File "/usr/lib/python2.6/site-packages/saharaclient/api/clusters.py" in list 68. return self._list('/clusters', 'clusters') File "/usr/lib/python2.6/site-packages/saharaclient/api/base.py" in _list 108. self._raise_api_exception(resp) File "/usr/lib/python2.6/site-packages/saharaclient/api/base.py" in _raise_api_exception 132. error_data = get_json(resp) File "/usr/lib/python2.6/site-packages/saharaclient/api/base.py" in get_json 145. return response.json() File "/usr/lib/python2.6/site-packages/requests/models.py" in json 604. return json.loads(self.text or self.content) File "/usr/lib64/python2.6/site-packages/simplejson/__init__.py" in loads 307. return _default_decoder.decode(s) File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py" in decode 335. obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py" in raw_decode 353. raise ValueError("No JSON object could be decoded")

Exception Type: ValueError at /sahara/ Exception Value: No JSON object could be decoded

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-08-08 13:19:26 -0600

alazarev gravatar image

"No JSON object could be decoded" means that horizon expected JSON response but received something else. Most probably this is HTML 404 response. Please check that horizon configuration (or service catalog in keystone) points to the right URL of sahara. Also note that URL format was changed in icehouse and now pattern contains tenant id in URL (e.g. "http://172.18.168.12:8386/v1.1/$(tenant_id)s").

edit flag offensive delete link more

Comments

I've filed https://bugs.launchpad.net/python-sah... to improve error reporting.

alazarev gravatar imagealazarev ( 2014-08-11 15:46:02 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-07-29 04:24:57 -0600

Seen: 220 times

Last updated: Jul 29 '14