[traceback] UnicodeEncodeError on /admin/customercare/reply/

RESOLVED FIXED in 2012.13

Status

P4
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: rrosario, Assigned: rrosario)

Tracking

unspecified
2012.13

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: u=dev c=AoA p=1)

(Assignee)

Description

6 years ago
Unicode is hard. This is preventing me from seeing replies in the admin.


Traceback (most recent call last):

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/contrib/admin/options.py", line 307, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/utils/decorators.py", line 93, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/views/decorators/cache.py", line 79, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/contrib/admin/sites.py", line 197, in inner
    return view(request, *args, **kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/utils/decorators.py", line 28, in _wrapper
    return bound_func(*args, **kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/utils/decorators.py", line 93, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/utils/decorators.py", line 24, in bound_func
    return func(self, *args2, **kwargs2)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/contrib/admin/options.py", line 1179, in changelist_view
    ], context, context_instance=context_instance)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/shortcuts/__init__.py", line 20, in render_to_response
    return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/loader.py", line 188, in render_to_string
    return t.render(context_instance)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 123, in render
    return self._render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 117, in _render
    return self.nodelist.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 744, in render
    bits.append(self.render_node(node, context))

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 757, in render_node
    return node.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/loader_tags.py", line 127, in render
    return compiled_parent._render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 117, in _render
    return self.nodelist.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 744, in render
    bits.append(self.render_node(node, context))

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 757, in render_node
    return node.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/loader_tags.py", line 127, in render
    return compiled_parent._render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 117, in _render
    return self.nodelist.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 744, in render
    bits.append(self.render_node(node, context))

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 757, in render_node
    return node.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/loader_tags.py", line 64, in render
    result = block.nodelist.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 744, in render
    bits.append(self.render_node(node, context))

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 757, in render_node
    return node.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/loader_tags.py", line 64, in render
    result = block.nodelist.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 744, in render
    bits.append(self.render_node(node, context))

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 757, in render_node
    return node.render(context)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/base.py", line 921, in render
    dict = func(*args)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/contrib/admin/templatetags/admin_list.py", line 232, in result_list
    'results': list(results(cl))}

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/contrib/admin/templatetags/admin_list.py", line 217, in results
    yield ResultList(None, items_for_result(cl, res, None))

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/contrib/admin/templatetags/admin_list.py", line 209, in __init__
    super(ResultList, self).__init__(*items)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/contrib/admin/templatetags/admin_list.py", line 137, in items_for_result
    f, attr, value = lookup_field(field_name, result, cl.model_admin)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/contrib/admin/util.py", line 218, in lookup_field
    value = attr()

  File "/data/www/support.mozilla.org/kitsune/apps/customercare/models.py", line 56, in __unicode__
    return '@{u}: {t}'.format(u=self.twitter_username, t=tweet['text'])

UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 53: ordinal not in range(128)

Updated

6 years ago
Priority: -- → P4
(Assignee)

Updated

6 years ago
Assignee: nobody → rrosario
(Assignee)

Comment 1

6 years ago
Landed in prod:

https://github.com/mozilla/kitsune/commit/2e909a9a72fc5962cb11f56ce1a7a1c5604995c0
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.