[traceback] %o format: a number is required, not _MarkupEscapeHelper

VERIFIED FIXED

Status

support.mozilla.org
General
VERIFIED FIXED
2 years ago
2 years ago

People

(Reporter: mythmon, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: u=user p=1, URL)

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
This looks like fallout from the template/puente upgrade recently.

%o format: a number is required, not _MarkupEscapeHelper

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "newrelic/hooks/framework_django.py", line 497, in wrapper
    return wrapped(*args, **kwargs)
  File "django/views/decorators/http.py", line 41, in inner
    return func(request, *args, **kwargs)
  File "kitsune/dashboards/views.py", line 210, in aggregated_metrics
    'products': Product.objects.filter(visible=True),
  File "django/shortcuts.py", line 50, in render
    return HttpResponse(loader.render_to_string(*args, **kwargs),
  File "django/template/loader.py", line 178, in render_to_string
    return t.render(context_instance)
  File "jingo/__init__.py", line 98, in render
    return super(Template, self).render(context_dict)
  File "newrelic/api/function_trace.py", line 98, in dynamic_wrapper
    return wrapped(*args, **kwargs)
  File "jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/data/www/support.mozilla.org/kitsune/kitsune/dashboards/templates/dashboards/aggregated_metrics.html", line 10, in top-level template code
    {% set product_slug = product.slug if product else 'null' %}
  File "/data/www/support.mozilla.org/kitsune/kitsune/sumo/templates/base.html", line 187, in top-level template code
    {% block content %}{% endblock %}
  File "/data/www/support.mozilla.org/kitsune/kitsune/dashboards/templates/dashboards/aggregated_metrics.html", line 27, in block "content"
    <h2>{{ _('Top 100 Articles: %% Localized') }}</h2>
  File "jinja2/ext.py", line 127, in _gettext_alias
    return __context.call(__context.resolve('gettext'), *args, **kwargs)
  File "jinja2/ext.py", line 136, in gettext
    return rv % variables
  File "jinja2/_markupsafe/__init__.py", line 98, in __mod__
    return self.__class__(unicode.__mod__(self, arg))
(Reporter)

Comment 2

2 years ago
I think this was a localization error which has been fixed. I can't reproduce the problem anymore.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(In reply to Mike Cooper [:mythmon] from comment #2)
> I think this was a localization error which has been fixed. I can't
> reproduce the problem anymore.

Verified FIXED; neither can I, and Sentry hasn't seen this lately either.
Status: RESOLVED → VERIFIED
Created attachment 8723751 [details]
Post-fix screenshot, showing 200 OK on prod
You need to log in before you can comment on or make changes to this bug.