TypeError: cannot concatenate 'str' and 'NoneType' objects

VERIFIED FIXED in 2.0

Status

Input
General
P1
critical
VERIFIED FIXED
8 years ago
7 years ago

People

(Reporter: stephend, Assigned: wenzel)

Tracking

({regression})

Trunk
regression

Details

(Whiteboard: [qa-], URL)

(Reporter)

Description

8 years ago
http://m.input.stage.mozilla.com/en-US/ is now yielding:

Traceback (most recent call last):

  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/Django/django/utils/decorators.py", line 76, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/www/input.stage.mozilla.com/reporter/apps/input/decorators.py", line 33, in cached_view
    return f(request, *args, **kwargs)

  File "/data/www/input.stage.mozilla.com/reporter/apps/dashboard/views.py", line 83, in dashboard
    return jingo.render(request, template, data)

  File "/data/www/input.stage.mozilla.com/reporter/vendor/src/jingo/jingo/__init__.py", line 63, in render
    rendered = render_to_string(request, template, context)

  File "/data/www/input.stage.mozilla.com/reporter/vendor/src/jingo/jingo/__init__.py", line 84, in render_to_string
    return template.render(**get_context())

  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/jinja2/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/www/input.stage.mozilla.com/reporter/apps/dashboard/templates/dashboard/mobile/dashboard.html", line 1, in top-level template code
    {% extends "base_mobile.html" %}

  File "/data/www/input.stage.mozilla.com/reporter/templates/base_mobile.html", line 26, in top-level template code
    {% block content %}{% endblock %}

  File "/data/www/input.stage.mozilla.com/reporter/apps/dashboard/templates/dashboard/mobile/dashboard.html", line 49, in block "content"
    {{ platforms_block(demo.os, opinion_count) }}

  File "/data/www/input.stage.mozilla.com/reporter/apps/dashboard/helpers.py", line 60, in platforms_block
    return render_template(tpl, new_context(**locals()))

  File "/data/www/input.stage.mozilla.com/reporter/apps/dashboard/helpers.py", line 22, in render_template
    t = register.env.get_template(template).render(context)

  File "/data/www/input.stage.mozilla.com/reporter/vendor/packages/jinja2/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/www/input.stage.mozilla.com/reporter/apps/dashboard/templates/dashboard/mobile/platforms.html", line 16, in top-level template code
    {{ os_item(item.os, item.count) }}

  File "/data/www/input.stage.mozilla.com/reporter/apps/dashboard/templates/dashboard/mobile/platforms.html", line 2, in template
    {{ mobile_bar(name='os', id='os_'+os, value=os, selected=selected,

TypeError: cannot concatenate 'str' and 'NoneType' objects
Priority: -- → P1
(Assignee)

Comment 1

8 years ago
I'll fix this. Not sure why this is showing up in the first place (rogue data?) but if we replace the + with a %s..., then at least this won't error out so weirdly.
Assignee: nobody → fwenzel
(Assignee)

Comment 2

8 years ago
Fix and test: http://github.com/fwenzel/reporter/commit/430f043

Marking this [qa-] because this is not easily reproducible, but please reopen if you do see such a traceback again.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
(Assignee)

Comment 3

8 years ago
The same thing happens for the locale field.
(Assignee)

Updated

8 years ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 4

8 years ago
Fixed and tested this one as well. http://github.com/fwenzel/reporter/commit/a57f814
Status: REOPENED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
(Reporter)

Comment 5

8 years ago
I haven't seen this since, so marking verified.
Status: RESOLVED → VERIFIED
Component: Input → General
Product: Webtools → Input
You need to log in before you can comment on or make changes to this bug.