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

RESOLVED FIXED in 60

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: stephend, Assigned: espressive)

Tracking

unspecified

Firefox Tracking Flags

(Not tracked)

Details

(URL)

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.
See Also: → bug 914933
(Assignee)

Comment 4

5 years ago
Resolving this as part of https://bugzilla.mozilla.org/show_bug.cgi?id=909930
Assignee: nobody → schalk.neethling.bugs
Status: NEW → ASSIGNED
(Assignee)

Comment 5

5 years ago
https://github.com/mozilla/socorro/pull/1498
Target Milestone: --- → 60
(Assignee)

Comment 6

5 years ago
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.
(Assignee)

Comment 7

5 years ago
Fixed by https://bugzilla.mozilla.org/show_bug.cgi?id=909930
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.