[traceback] Problems with data validity in new troubleshooting parsing.

RESOLVED FIXED

Status

support.mozilla.org
Questions
P1
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mythmon, Assigned: mythmon)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: u=user c=questions p=1 s=2013.4)

(Assignee)

Description

5 years ago
Internal Server Error: /en-US/questions/946307

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "mobility/decorators.py", line 23, in wrapper
    return f(request, *args, **kw)
  File "session_csrf/__init__.py", line 127, in wrapper
    response = f(request, *args, **kw)
  File "questions/views.py", line 243, in answers
    return jingo.render(request, template, extra_kwargs)
  File "jingo/__init__.py", line 75, in render
    rendered = render_to_string(request, template, context)
  File "jingo/__init__.py", line 93, in render_to_string
    return template.render(get_context())
  File "jingo/__init__.py", line 189, in render
    return super(Template, self).render(context_dict)
  File "jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/data/www/support.mozilla.org/kitsune/apps/questions/templates/questions/answers.html", line 18, in top-level template code
    {% set meta = (('robots', 'noindex'),) %}
  File "/data/www/support.mozilla.org/kitsune/apps/questions/templates/questions/base.html", line 6, in top-level template code
    {% set scripts = ('questions', 'libs/jqueryui') %}
  File "/data/www/support.mozilla.org/kitsune/templates/base.html", line 169, in top-level template code
    {% block content %}{% endblock %}
  File "/data/www/support.mozilla.org/kitsune/apps/questions/templates/questions/answers.html", line 222, in block "content"
    {{ troubleshooting_info(question) }}
  File "/data/www/support.mozilla.org/kitsune/apps/questions/templates/questions/includes/questions.html", line 60, in template
    {% if parsed.userJS.exists %}
  File "jinja2/environment.py", line 371, in getattr
    return getattr(obj, attribute)
(Assignee)

Comment 1

5 years ago
Adding metadata, tossing in the current sprint and estimating at 1pt since it is a simple error.
Assignee: nobody → mcooper
OS: Linux → All
Priority: -- → P1
Hardware: x86_64 → All
Whiteboard: u=user c=questions p=1 s=2013.4
(Assignee)

Comment 3

5 years ago
Adding on another traceback to this bug: https://errormill.mozilla.org/support/support/group/14931


TypeError: string indices must be integers

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "mobility/decorators.py", line 23, in wrapper
    return f(request, *args, **kw)
  File "session_csrf/__init__.py", line 127, in wrapper
    response = f(request, *args, **kw)
  File "questions/views.py", line 221, in answers
    (k, v) for k, v in parsed['modifiedPreferences'].items()
Summary: [traceback] 'dict object' has no attribute 'userJS' → [traceback] Problems with data validity in new troubleshooting parsing.
(Assignee)

Comment 5

5 years ago
Both of these fixes are on prod now.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Reopening this with a new issue:

https://errormill.mozilla.org/support/support/group/14935/

AttributeError: 'unicode' object has no attribute 'items'


Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "mobility/decorators.py", line 23, in wrapper
    return f(request, *args, **kw)
  File "session_csrf/__init__.py", line 127, in wrapper
    response = f(request, *args, **kw)
  File "questions/views.py", line 250, in answers
    return jingo.render(request, template, extra_kwargs)
  File "jingo/__init__.py", line 75, in render
    rendered = render_to_string(request, template, context)
  File "jingo/__init__.py", line 93, in render_to_string
    return template.render(get_context())
  File "jingo/__init__.py", line 189, in render
    return super(Template, self).render(context_dict)
  File "jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/data/www/support.mozilla.org/kitsune/apps/questions/templates/questions/answers.html", line 18, in top-level template code
    {% set meta = (('robots', 'noindex'),) %}
  File "/data/www/support.mozilla.org/kitsune/apps/questions/templates/questions/base.html", line 6, in top-level template code
    {% set scripts = ('questions', 'libs/jqueryui') %}
  File "/data/www/support.mozilla.org/kitsune/templates/base.html", line 169, in top-level template code
    {% block content %}{% endblock %}
  File "/data/www/support.mozilla.org/kitsune/apps/questions/templates/questions/answers.html", line 222, in block "content"
    {{ troubleshooting_info(question) }}
  File "/data/www/support.mozilla.org/kitsune/apps/questions/templates/questions/includes/questions.html", line 48, in template
    {% for key, value in parsed.graphics|dictsort %}
  File "jinja2/filters.py", line 176, in do_dictsort
    return sorted(value.items(), key=sort_func)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Ricky pushed a new raven-python, so this is getting tracked in another sentry thing now:

https://errormill.mozilla.org/support/support/group/14940/
(Assignee)

Comment 8

5 years ago
Another change:
PR: https://github.com/mozilla/kitsune/pull/1171
https://github.com/mozilla/kitsune/commit/e710c229c8740fcdf2d245f674ec680554dbf42a

Pushing this out to prod now. I think I'll watch this for a bit before closing it out again.
(Assignee)

Comment 9

5 years ago
I haven't seen anymore errors since I pushed this. Closing it out.
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.