If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[traceback] "OverflowError: cannot convert float infinity to integer" in smart_int

RESOLVED FIXED

Status

Input Graveyard
Dashboard
P1
normal
RESOLVED FIXED
4 years ago
8 months ago

People

(Reporter: willkg, Assigned: willkg)

Tracking

Details

(Whiteboard: u=user c=dashboard p=1 s=input.2013q2)

Traceback (most recent call last):

  File "/data/www/input.mozilla.org/input/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/input.mozilla.org/input/vendor-local/src/elasticutils/elasticutils/contrib/django/__init__.py", line 121, in wrapper
    return fun(request, *args, **kw)

  File "/data/www/input.mozilla.org/input/vendor/src/django-mobility/mobility/decorators.py", line 23, in wrapper
    return f(request, *args, **kw)

  File "/data/www/input.mozilla.org/input/fjord/analytics/views.py", line 150, in dashboard
    page = smart_int(request.GET.get('page', 1), 1)

  File "/data/www/input.mozilla.org/input/fjord/base/util.py", line 31, in smart_int
    return int(float(s))

OverflowError: cannot convert float infinity to integer


<WSGIRequest
path:/en-US/,
GET:<QueryDict: {u'locale': [u'nl'], u'q': [u'1'], u'date_end': [u'2013-05-03'], u'date_start': [u'2013-04-26'], u'page': [u'1e309']}>,


Test urls:

* prod: https://input.mozilla.org/en-US/?date_end=2013-05-03&date_start=2013-04-26&locale=nl&page=1e309&q=1

* localhost: https://127.0.0.1:8000/en-US/?date_end=2013-05-03&date_start=2013-04-26&locale=nl&page=1e309&q=1
I hate getting error email and this is an easy fix (handle OverflowError). This should get fixed pronto. Making it a P1 in this quarter sprint and grabbing it to do today.
Assignee: nobody → willkg
Priority: -- → P1
Whiteboard: u=user c=dashboard p=1 s=input.2013q2
Pull request: https://github.com/mozilla/fjord/pull/99
Landed in master in https://github.com/mozilla/fjord/commit/1370ef3
Pushed to prod just now.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.