Blank screen of death! Why?

12 views
Skip to first unread message

slizardo

unread,
Jun 20, 2008, 8:30:45 AM6/20/08
to Google App Engine
I'm getting random (apparently) blank screens on my application
http://www.votelook.com (http://votelook.appspot.com)
I reviewed my code but I couldn't find any mistake related to this
issue. Have anyone of you encountered similar problems?

Thank you!

Marzia Niccolai

unread,
Jun 20, 2008, 12:14:33 PM6/20/08
to google-a...@googlegroups.com
Hi,
 This can happen if you forget:

if __name__ == '__main__':
  main()

In your file.

-Marzia

slizardo

unread,
Jun 23, 2008, 9:06:25 AM6/23/08
to Google App Engine
You were right, I accidentally removed that sentences from my
application entry point.

Now it's solved, thank you!

On Jun 20, 6:14 pm, "Marzia Niccolai" <ma...@google.com> wrote:
> Hi,
>  This can happen if you forget:
>
> if __name__ == '__main__':
>   main()
>
> In your file.
>
> -Marzia
>
> On Fri, Jun 20, 2008 at 5:30 AM, slizardo <santiago.liza...@gmail.com>
> wrote:
>
>
>
> > I'm getting random (apparently) blank screens on my application
> >http://www.votelook.com(http://votelook.appspot.com)

Brett Morgan

unread,
Jun 23, 2008, 9:54:39 AM6/23/08
to google-a...@googlegroups.com
Should i ask how that works?

The first load of the script does nothing, but is kept in ram because
it contains a main(), and it works from the second call onwards?

--

Brett Morgan http://brett.morgan.googlepages.com/

nchauvat (Logilab)

unread,
Jun 23, 2008, 10:41:38 AM6/23/08
to Google App Engine
> Should i ask how that works?

Is this an answer to your question ? http://docs.python.org/lib/module-main.html

I am not sure I understood it.

Brett Morgan

unread,
Jun 23, 2008, 11:32:39 AM6/23/08
to google-a...@googlegroups.com
My guess is based on my understanding of appcaching:
http://code.google.com/appengine/docs/python/appcaching.html

Basically, if a script has a no argument main() function, it will get
cached, akin to FastCGI. The lack of a if __name__ == "__main__" test
would mean that on the *first* invocation, no output would be
produced, but there after it would work properly. I think.

--

Brett Morgan http://brett.morgan.googlepages.com/

Reply all
Reply to author
Forward
0 new messages