Skip to content

KeyError: '__main__' #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

KeyError: '__main__' #279

egasimus opened this issue Apr 30, 2012 · 8 comments

Comments

@egasimus
Copy link

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
Copy link

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
Copy link

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
Copy link

@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
Copy link

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

@ecabuk
Copy link

ecabuk commented Sep 8, 2012

except (IOError, IndexError, KeyError):

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

@westhomas
Copy link

Worked on google appengine 1.7.2.

@CoatedMoose
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants