Closed Bug 866732 Opened 13 years ago Closed 11 years ago

[socorro-crashstats] TypeError on use of urlencode in report index

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Unassigned)

References

()

Details

This happens because the data we get back from /crash_data/ on stage contains a structure whose value of `os_name` or `signature` is None. Both are needed in the template and don't allow for not being set.
TypeError: argument of type 'NoneType' is not iterable Stacktrace (most recent call last): File "django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs) File "crashstats/crashstats/views.py", line 180, in inner return view(request, *args, **kwargs) File "crashstats/crashstats/views.py", line 896, in report_index return render(request, 'crashstats/report_index.html', data) File "django/shortcuts/__init__.py", line 44, in render return HttpResponse(loader.render_to_string(*args, **kwargs), File "django/template/loader.py", line 176, in render_to_string return t.render(context_instance) 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/crash-stats-django.allizom.org/app/crashstats/crashstats/templates/crashstats/report_index.html", line 1, in top-level template code {% extends "crashstats_base.html" %} File "/data/www/crash-stats-django.allizom.org/app/crashstats/base/templates/crashstats_base.html", line 132, in top-level template code {% block content %}{% endblock %} File "/data/www/crash-stats-django.allizom.org/app/crashstats/crashstats/templates/crashstats/report_index.html", line 488, in block "content" path: '/{{ product }}/{{ version }}/{{ report.os_name | urlencode }}/{{ report.signature|urlencode }}/', File "crashstats/crashstats/helpers.py", line 27, in urlencode return urllib.quote_plus(txt) File "python2.6/urllib.py", line 1241, in quote_plus if ' ' in s:
This was rewritten a long time ago.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.