Skip to content

KeyError in SQLDebugPanel on Postgres 9.1.4 #287

demichej opened this Issue Jun 8, 2012 · 3 comments

4 participants

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.


Request Method: GET
Request URL:

Django Version: 1.4
Python Version: 2.7.3
Installed Applications:
Installed Middleware:

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

  1. response = callback(request, callback_args, *callback_kwargs) File "/data/code/yum/yum/home/" 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/" in iter
  3. len(self) File "/usr/local/lib/python2.7/dist-packages/django/db/models/" in len
  4. self._result_cache = list(self.iterator()) File "/usr/local/lib/python2.7/dist-packages/django/db/models/" in iterator
  5. for row in compiler.results_iter(): File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/" in results_iter
  6. for rows in self.execute_sql(MULTI): File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/" 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/" 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/" 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/" in get_panel
  10. return self._panels[cls]

Exception Type: KeyError at /
Exception Value:

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

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


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


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.