Skip to content

KeyError in SQLDebugPanel on Postgres 9.1.4 #287

Closed
demichej opened this Issue Jun 8, 2012 · 3 comments

4 participants

@demichej
demichej commented Jun 8, 2012

My database got upgraded to Postgres 9.1.4 on Ubuntu 12. Upon doing so, I am getting a KeyError. See the stacktrace for more info: Everything worked fine under 9.1.3.

Environment:

Request Method: GET
Request URL:

Django Version: 1.4
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',
'debug_toolbar')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.transaction.TransactionMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1. response = callback(request, callback_args, *callback_kwargs) File "/data/code/yum/yum/home/views.py" in index
  2. active_rest_objs=list(Restaurant.objects.find_all_with_related(True)) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in iter
  3. len(self) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in len
  4. self._result_cache = list(self.iterator()) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in iterator
  5. for row in compiler.results_iter(): File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in results_iter
  6. for rows in self.execute_sql(MULTI): File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in execute_sql
  7. cursor = self.connection.cursor() File "/usr/local/lib/python2.7/dist-packages/django_debug_toolbar-0.9.4-py2.7.egg/debug_toolbar/utils/tracking/init.py" in wrapped
  8. return callback(func, args, *kwargs) File "/usr/local/lib/python2.7/dist-packages/django_debug_toolbar-0.9.4-py2.7.egg/debug_toolbar/panels/sql.py" in cursor
  9. logger = djdt.get_panel(SQLDebugPanel) File "/usr/local/lib/python2.7/dist-packages/django_debug_toolbar-0.9.4-py2.7.egg/debug_toolbar/toolbar/loader.py" in get_panel
  10. return self._panels[cls]

Exception Type: KeyError at /
Exception Value:

@jezdez
django-debug-toolbar member
jezdez commented Jun 26, 2012

I can't reproduce this, unfortunately. What kind of panels do you have configured?

@schmilblick

I'm getting the same error, and I'm on PostgreSQL 8.x. I'll get back with more information.

@aaugustin

As we're still missing some information to debug this problem, I'm going to close the ticket. Thanks for the report anyway.

Anyone reading this — if you can reproduce this problem, please open a new ticket, and we'll try to debug it.

@aaugustin aaugustin closed this Oct 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.