← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1537713] [NEW] AttributeError: 'module' object has no attribute 'ClientException'

 

Public bug reported:


In openstack_dashboard/usage/quotas.py (https://github.com/openstack/horizon/blob/master/openstack_dashboard/usage/quotas.py)
there is a couple of calls to cinder.ClientException which is not the proper route.

Proper route is cinder.cinder_exception.ClientException


[25/Jan/2016 10:46:12] "GET /project/instances/launch HTTP/1.1" 200 23987
Internal Server Error: /project/instances/launch
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/mrunge/work/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/home/mrunge/work/horizon/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/home/mrunge/work/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/home/mrunge/work/horizon/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/mrunge/work/horizon/horizon/workflows/views.py", line 167, in post
    context = self.get_context_data(**kwargs)
  File "/home/mrunge/work/horizon/horizon/workflows/views.py", line 91, in get_context_data
    workflow = self.get_workflow()
  File "/home/mrunge/work/horizon/horizon/workflows/views.py", line 81, in get_workflow
    entry_point=entry_point)
  File "/home/mrunge/work/horizon/horizon/workflows/base.py", line 651, in __init__
    valid = step.action.is_valid()
  File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 184, in is_valid
    return self.is_bound and not self.errors
  File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 176, in errors
    self.full_clean()
  File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 393, in full_clean
    self._clean_form()
  File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 417, in _clean_form
    cleaned_data = self.clean()
  File "/home/mrunge/work/horizon/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py", line 368, in clean
    self._check_quotas(cleaned_data)
  File "/home/mrunge/work/horizon/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py", line 210, in _check_quotas
    usages = quotas.tenant_quota_usages(self.request)
  File "/home/mrunge/work/horizon/horizon/utils/memoized.py", line 90, in wrapped
    value = cache[key] = func(*args, **kwargs)
  File "/home/mrunge/work/horizon/openstack_dashboard/usage/quotas.py", line 371, in tenant_quota_usages
    tenant_id=tenant_id):
  File "/home/mrunge/work/horizon/openstack_dashboard/usage/quotas.py", line 171, in get_tenant_quota_data
    tenant_id=tenant_id)
  File "/home/mrunge/work/horizon/openstack_dashboard/usage/quotas.py", line 150, in _get_quota_data
    except cinder.ClientException:
AttributeError: 'module' object has no attribute 'ClientException'
[25/Jan/2016 10:46:23] "POST /project/instances/launch HTTP/1.1" 500 98732

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1537713

Title:
  AttributeError: 'module' object has no attribute 'ClientException'

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  
  In openstack_dashboard/usage/quotas.py (https://github.com/openstack/horizon/blob/master/openstack_dashboard/usage/quotas.py)
  there is a couple of calls to cinder.ClientException which is not the proper route.

  Proper route is cinder.cinder_exception.ClientException


  [25/Jan/2016 10:46:12] "GET /project/instances/launch HTTP/1.1" 200 23987
  Internal Server Error: /project/instances/launch
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/mrunge/work/horizon/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/home/mrunge/work/horizon/horizon/decorators.py", line 52, in dec
      return view_func(request, *args, **kwargs)
    File "/home/mrunge/work/horizon/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/home/mrunge/work/horizon/horizon/decorators.py", line 84, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
      return self.dispatch(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
      return handler(request, *args, **kwargs)
    File "/home/mrunge/work/horizon/horizon/workflows/views.py", line 167, in post
      context = self.get_context_data(**kwargs)
    File "/home/mrunge/work/horizon/horizon/workflows/views.py", line 91, in get_context_data
      workflow = self.get_workflow()
    File "/home/mrunge/work/horizon/horizon/workflows/views.py", line 81, in get_workflow
      entry_point=entry_point)
    File "/home/mrunge/work/horizon/horizon/workflows/base.py", line 651, in __init__
      valid = step.action.is_valid()
    File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 184, in is_valid
      return self.is_bound and not self.errors
    File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 176, in errors
      self.full_clean()
    File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 393, in full_clean
      self._clean_form()
    File "/usr/lib/python2.7/site-packages/django/forms/forms.py", line 417, in _clean_form
      cleaned_data = self.clean()
    File "/home/mrunge/work/horizon/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py", line 368, in clean
      self._check_quotas(cleaned_data)
    File "/home/mrunge/work/horizon/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py", line 210, in _check_quotas
      usages = quotas.tenant_quota_usages(self.request)
    File "/home/mrunge/work/horizon/horizon/utils/memoized.py", line 90, in wrapped
      value = cache[key] = func(*args, **kwargs)
    File "/home/mrunge/work/horizon/openstack_dashboard/usage/quotas.py", line 371, in tenant_quota_usages
      tenant_id=tenant_id):
    File "/home/mrunge/work/horizon/openstack_dashboard/usage/quotas.py", line 171, in get_tenant_quota_data
      tenant_id=tenant_id)
    File "/home/mrunge/work/horizon/openstack_dashboard/usage/quotas.py", line 150, in _get_quota_data
      except cinder.ClientException:
  AttributeError: 'module' object has no attribute 'ClientException'
  [25/Jan/2016 10:46:23] "POST /project/instances/launch HTTP/1.1" 500 98732

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1537713/+subscriptions


Follow ups