GAE is missing requests

38 views
Skip to first unread message

Nikolay Sohryakov

unread,
Jul 12, 2011, 4:04:37 PM7/12/11
to google-a...@googlegroups.com
Hi,

Sometimes GAE is missing my requests and instead of the requested page i get a clean page in my browser! Can you fix it please? I've tested it in different browsers on different computers.

Thank you.

djidjadji

unread,
Jul 13, 2011, 2:52:49 AM7/13/11
to google-a...@googlegroups.com
If you use Python API do you have the correct

if __name__== 'main':
main()

in your code

2011/7/12 Nikolay Sohryakov <nikolay....@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/BumLr0219OwJ.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

Nikolay Sohryakov

unread,
Jul 13, 2011, 4:43:18 AM7/13/11
to google-a...@googlegroups.com
I'm trying to implement my handler for the OAuth2 protocol. I looked at google's implementation at google-api-python-client\oauth2client\appengine.py. It works 90% of the time. This part of my module is
application = webapp.WSGIApplication([
('/oauth2client', OAuth2Handler)
])


def main():
logging.getLogger().setLevel(logging.DEBUG)
run_wsgi_app(application)

I did it exactly like it done in google's module. And btw when i was using google's implementation it worked exactly in the same way. Some requests were missed.

Geoffrey Spear

unread,
Jul 13, 2011, 10:08:47 AM7/13/11
to Google App Engine


On Jul 13, 4:43 am, Nikolay Sohryakov <nikolay.sohrya...@gmail.com>
wrote:
Without the if __name__ = "__main__" bit, your main() function won't
be run when the script is imported the first time, only on subsequent
calls.

Nikolay Sohryakov

unread,
Jul 13, 2011, 11:11:37 AM7/13/11
to google-a...@googlegroups.com
I've tested it and it worked! Thank you!

Does that means that google's code is wrong? Should I make an issue in bug tracker ?
Reply all
Reply to author
Forward
0 new messages