← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1477461] [NEW] UnicodeDecodeError deleting instance with Spanish as browser language

 

Public bug reported:

Hi all,

When I try to delete an instance from Horizon, I get an error message if
my browser is using Spanish as its primary language (and thus Horizon
uses it too):


¡Algo ha ido mal!
Ha ocurrido un error inesperado. Pruebe a refrescar la página. Si esto no lo soluciona, contacte con su administrador local.


Also, /var/log/horizon/horizon.log shows this trace:


2015-07-23 08:59:47,767 23435 ERROR django.request Internal Server Error: /dashboard/project/instances/
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 "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/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 "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 223, in post
    return self.get(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 159, in get
    handled = self.construct_tables()
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 150, in construct_tables
    handled = self.handle_table(table)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 125, in handle_table
    handled = self._tables[name].maybe_handle()
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1640, in maybe_handle
    return self.take_action(action_name, obj_id)
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1482, in take_action
    response = action.multiple(self, self.request, obj_ids)
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 302, in multiple
    return self.handle(data_table, request, object_ids)
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 827, in handle
    exceptions.handle(request, ignore=ignore)
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 364, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 817, in handle
    (self._get_action_name(past=True), datum_display))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)


The instance is deleted anyway. Then I change the browser language (in Firefox, about:config and set intl.accept_languages to “en”), try to delete another instance and everything runs smoothly.
I suspect there is a problem with translation of message “Success: Scheduled termination of Instance:” which is shown when using English, but not in Spanish (the error above appears instead).

You can try it by yourselves setting your browser to language “es”. My
versions:

CentOS Linux release 7.1.1503 (Core)
openstack-dashboard.noarch       2015.1.0-7.el7      @openstack-kilo

Regards.

** 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/1477461

Title:
  UnicodeDecodeError deleting instance with Spanish as browser language

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Hi all,

  When I try to delete an instance from Horizon, I get an error message
  if my browser is using Spanish as its primary language (and thus
  Horizon uses it too):

  
  ¡Algo ha ido mal!
  Ha ocurrido un error inesperado. Pruebe a refrescar la página. Si esto no lo soluciona, contacte con su administrador local.

  
  Also, /var/log/horizon/horizon.log shows this trace:

  
  2015-07-23 08:59:47,767 23435 ERROR django.request Internal Server Error: /dashboard/project/instances/
  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 "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 52, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/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 "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 223, in post
      return self.get(request, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 159, in get
      handled = self.construct_tables()
    File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 150, in construct_tables
      handled = self.handle_table(table)
    File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 125, in handle_table
      handled = self._tables[name].maybe_handle()
    File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1640, in maybe_handle
      return self.take_action(action_name, obj_id)
    File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1482, in take_action
      response = action.multiple(self, self.request, obj_ids)
    File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 302, in multiple
      return self.handle(data_table, request, object_ids)
    File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 827, in handle
      exceptions.handle(request, ignore=ignore)
    File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 364, in handle
      six.reraise(exc_type, exc_value, exc_traceback)
    File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 817, in handle
      (self._get_action_name(past=True), datum_display))
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)


  The instance is deleted anyway. Then I change the browser language (in Firefox, about:config and set intl.accept_languages to “en”), try to delete another instance and everything runs smoothly.
  I suspect there is a problem with translation of message “Success: Scheduled termination of Instance:” which is shown when using English, but not in Spanish (the error above appears instead).

  You can try it by yourselves setting your browser to language “es”. My
  versions:

  CentOS Linux release 7.1.1503 (Core)
  openstack-dashboard.noarch       2015.1.0-7.el7      @openstack-kilo

  Regards.

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


Follow ups