578: Sort on Submitter causes index error

manny.r********@gmai***** (Google Code) (Is this you? Claim this profile.)
Dec. 28, 2008
What's the URL of the page containing the problem?
http://ledmb131/dashboard/?sort=submitter,-time_added

What steps will reproduce the problem?
1. Go to dashboard view
2. click on submitter to sort on that column
3.

What is the expected output? What do you see instead?
I would expect to see the sorted list.
Instead, I get the exception listed below.


What operating system are you using? What browser?
Firefox/Windows

Please provide any additional information below.

Request Method:  	GET
Request URL: 	http://ledmb131/dashboard/
Exception Type: 	IndexError
Exception Value: 	Number of args exceeds number of fields
Exception Location: 
/usr/lib/python2.5/site-packages/django/db/models/base.py in __init__, line 184
Python Executable: 	/usr/bin/python
Python Version: 	2.5.2
Python Path: 	['@djangodir@', '/var/www/', '/var/www/reviewboard',
'/var/www/reviewboard/djblets', '/usr/lib/python25.zip',
'/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL',
'/var/lib/python-support/python2.5']
Server time: 	Mon, 11 Aug 2008 16:25:33 -0400


Environment:

Request Method: GET
Request URL: http://ledmb131/dashboard/
Django Version: 0.97-pre-SVN-unknown
Python Version: 2.5.2
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.markup',
 'django.contrib.sites',
 'django.contrib.sessions',
 'djblets.datagrid',
 'djblets.feedview',
 'djblets.util',
 'djblets.webapi',
 'reviewboard.accounts',
 'reviewboard.admin',
 'reviewboard.diffviewer',
 'reviewboard.iphone',
 'reviewboard.reports',
 'reviewboard.reviews',
 'reviewboard.scmtools',
 'reviewboard.webapi',
 'django_evolution']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in
get_response
  85.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/var/www/reviewboard/djblets/auth/util.py" in _checklogin
  45.             return view_func(request, *args, **kwargs)
File "/var/www/reviewboard/accounts/decorators.py" in _check_valid_prefs
  41.                 return view_func(request, *args, **kwargs)
File "/var/www/reviewboard/reviews/views.py" in dashboard
  179.     return grid.render_to_response(template_name)
File "/var/www/reviewboard/djblets/datagrid/grids.py" in render_to_response
  555.         self.load_state()
File "/var/www/reviewboard/djblets/datagrid/grids.py" in load_state
  446.         self.precompute_objects()
File "/var/www/reviewboard/djblets/datagrid/grids.py" in precompute_objects
  511.         for obj in self.page.object_list:
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
_result_iter
  178.                 self._fill_cache()
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
_fill_cache
  605.                     self._result_cache.append(self._iter.next())
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in iterator
  273.                 obj = self.model(*row[index_start:])
File "/usr/lib/python2.5/site-packages/django/db/models/base.py" in __init__
  184.             raise IndexError("Number of args exceeds number of fields")

Exception Type: IndexError at /dashboard/
Exception Value: Number of args exceeds number of fields
chipx86
#1 chipx86
I imagine this is now fixed. I can't reproduce it, and a lot has changed since August
(in our code and in Django's ORM code). Please reopen if this still happens.
  • +UnableToReproduce