KeyError: '__main__' #279

Closed
egasimus opened this Issue Apr 30, 2012 · 8 comments

Projects

None yet

8 participants

@egasimus

I set up django-debug-toolbar according to the instructions, but now I get a KeyError on every page instead: http://pastebin.com/hbcbApEH

Running locally with Google App Engine SDK.

@diegoguimaraes

I have the same problem! no solution yet?

I noticed that I got this error just when I declare the INTERNAL_IPS = ('127.0.0.1',), if I comment this line I don't get this error, but the toolbar also doesn't show.

I'm running locally with Google App Engine SDK 1.6.6

@herberthamaral

At file debug_toolbar/utils/init.py at line 127, change this:

         except (IOError, IndexError):

into this:

        except (IOError, IndexError, KeyError):

Should be enough.

@pablorecio

@herberthamaral That change doesn't solve the problem because the exception is trigger outside that "try" block. I'm having the same problem using Google App Engine SDK 1.7.0. I guess that the problem is related to be using GAE.

@herberthamaral

I see. Well, it worked for me. Sadly, I'm not using the latest version of the SDK.

@ecabuk
ecabuk commented Sep 8, 2012

except (IOError, IndexError, KeyError):

Worked for me, I am using latest version of GAE sdk

@westhomas

Worked on google appengine 1.7.2.

@CoatedMoose

I am using google app engine sdk 1.7.7 with django 1.4 and I get this error. Using @herberthamaral 's suggestion fixed the problem, but I haven't checked the implications of it.

@analytik

Thank you, herberthamaral, works fine for me with GAE 1.8.1 / Django 1.5.1.

@aaugustin aaugustin closed this in 0bd0abd Oct 15, 2013
@jwg4 jwg4 referenced this issue in acoomans/flask-autodoc Jan 11, 2016
Open

gae keyerror main #23

@ryneeverett ryneeverett pushed a commit to ryneeverett/django-debug-toolbar that referenced this issue Oct 2, 2016
@aaugustin aaugustin Catch exceptions liberally when looking for sources.
Fix #279.
f73e80f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment