Wednesday, January 6, 2016

Sentry - That page number is less than 1 [error]

While running sentry, when you click on your project, it throws Internal server error with some random code. If you look at the log, it shows something like following. Only thing stands out is "That page number is less than 1"  

  File "/home/User/.virtualenvs/sentry/lib/python2.7/site-packages/sentry-6.4.4-py2.7.egg/sentry/templatetags/", line 217, in paginator
    result = paginate_func(request, queryset_or_list, per_page, endless=True)
  File "/home/User/.virtualenvs/sentry/lib/python2.7/site-packages/paging/", line 24, in paginate
    'paginator': paginator.get_context(page),
  File "/home/User/.virtualenvs/sentry/lib/python2.7/site-packages/paging/", line 96, in get_context
    'previous_page': paginator.previous_page_number(),
  File "/home/User/.virtualenvs/sentry/lib/python2.7/site-packages/Django-1.5.8-py2.7.egg/django/core/", line 143, in previous_page_number
    return self.paginator.validate_number(self.number - 1)
  File "/home/User/.virtualenvs/sentry/lib/python2.7/site-packages/Django-1.5.8-py2.7.egg/django/core/", line 30, in validate_number
    raise EmptyPage('That page number is less than 1')

EmptyPage: That page number is less than 1

This error is because of the django-paging version, you may have version lower than 0.2.5. you need >=0.2.5 

Run the following command -

pip install django-paging==0.2.5

And restart your sentry server (web). 

No comments:

Post a Comment