Closed Bug 887536 Opened 11 years ago Closed 11 years ago

[socorro-crashstats] UnboundLocalError: local variable 'version' referenced before assignment

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stephend, Assigned: espressive)

References

()

Details

Not sure why we don't see this on prod, but it might have something to do with which versions are available/enabled, etc.

STR:

Load https://crash-stats-django.allizom.org/crash_trends/products/Firefox

Actual:

UnboundLocalError: local variable 'version' referenced before assignment

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/decorators.py", line 48, in inner
    return view(request, *args, **kwargs)
  File "crashstats/crashstats/views.py", line 1608, in crash_trends
    context['version'] = version
Hmm that's odd, works locally pointing to dev too.
Resolving this as part of https://bugzilla.mozilla.org/show_bug.cgi?id=909930
Assignee: nobody → schalk.neethling.bugs
Status: NEW → ASSIGNED
https://github.com/mozilla/socorro/pull/1498
Target Milestone: --- → 60
The best and simplest way to test this, is to use the products from Comment 1 and ensure that these products no longer return a 500 error but now, the page loads successfully and there is a message provided to the user that there was no data found for the provided criteria.

Also, the versions will try to load but, if there are no Nightly versions at all, a message will also be shown above the form stating that no versions was found for the product.
Fixed by https://bugzilla.mozilla.org/show_bug.cgi?id=909930
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.