Skip to content
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

gae keyerror main #23

Open
alexey-sh opened this issue Sep 23, 2015 · 2 comments
Open

gae keyerror main #23

alexey-sh opened this issue Sep 23, 2015 · 2 comments
Labels

Comments

@alexey-sh
Copy link

Looks like gae limitation

Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/Users/alexey/projects/coolproject/main.py", line 35, in <module>
    @auto.doc()
  File "/Users/alexey/projects/coolproject/lib/flask_autodoc/autodoc.py", line 104, in decorator
    caller_frame = inspect.stack()[1]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 1055, in stack
    return getouterframes(sys._getframe(1), context)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 1033, in getouterframes
    framelist.append((frame,) + getframeinfo(frame, context))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 1008, in getframeinfo
    lines, lnum = findsource(frame)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 532, in findsource
    module = getmodule(object, file)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 504, in getmodule
    main = sys.modules['__main__']
KeyError: '__main__'
@lukeyeager lukeyeager added the bug label Sep 23, 2015
@lukeyeager
Copy link
Collaborator

Thanks for the bug report! This looks like a problem with #17.

Can you give me some example code to test with? I'm sure it will require choosing the location in the stack more intelligently than just inspect.stack()[1].

@jwg4
Copy link
Contributor

jwg4 commented Jan 11, 2016

Possibly related: django-commons/django-debug-toolbar#279

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

No branches or pull requests

3 participants