Can't get web2py working with GAE locally

244 views
Skip to first unread message

Jaime Sempere

unread,
Jan 2, 2014, 9:33:35 PM1/2/14
to web...@googlegroups.com
Hi everyone, this is driving me mad.

I used web2py and GAE one year ago and I liked a lot, fast and easy to work with gae. Now that I wanted to start another app, I have download GAE and Web2Py again (for having last releases and starting in a clean&new folder).

So, first change that I see is that when I run dev_appserver from GAE forces to use python 2.7. My first guess then, is that I need to change gaehandler in app.yaml and leave the code like this:

application: myapp
version: 1
api_version: 1


 
#script: gaehandler.py         # CGI
  script
: gaehandler.wsgiapp    # WSGI (Python 2.7 only)
  secure
: optional

But when I do a http://localhost:8080/

I obtain this error in console:

ERROR    2014-01-03 02:25:39,821 wsgi.py:262] 
Traceback (most recent call last):
  File "/home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py", line 239, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py", line 298, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py", line 84, in LoadObject
    obj = __import__(path[0])
ImportError: No module named gaehandler
INFO     2014-01-03 02:25:39,834 module.py:617] default: "GET / HTTP/1.1" 500 -
INFO     2014-01-03 02:25:40,208 module.py:617] default: "GET /favicon.ico HTTP/1.1" 304 -




And of course I can't see any html returned. Why gaehandler is missing?

I can reach localhost:8001/myapp   (web2py server)
But not       localhost:8080              (gae)

And second question: for running my appGAE locally do I need to have running web2py server? I used to have both running, but now I have seen that I need to change default port 8000 to other (i.e. 8001), because gae is using 8000 and 8080.


Any help would be very appreciated. Thank you 

Massimo Di Pierro

unread,
Jan 3, 2014, 9:25:17 PM1/3/14
to web...@googlegroups.com
It is in handlers/gaehandler.py 
There reason we moved is that we do now want to pollute the main folder and we do now want to overwrote any changes you may have to make to it upon upgrade. You have to 

cp handlers/gaehandler.py ./

Richard Penman

unread,
Aug 27, 2014, 9:45:43 AM8/27/14
to web...@googlegroups.com
Would be worth mentioning this in the book.

Massimo Di Pierro

unread,
Aug 29, 2014, 7:31:39 PM8/29/14
to web...@googlegroups.com
But now we simply do 

web2py.py -G GAE

and everything is taken care for you you automatically.

Richard Baron Penman

unread,
Aug 30, 2014, 3:06:08 AM8/30/14
to web...@googlegroups.com
oh, where is that documented? I didn't find it in the help message
(web2py.py -h) or the book.
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/M1wYyL9kr9U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Massimo Di Pierro

unread,
Aug 30, 2014, 11:54:47 AM8/30/14
to web...@googlegroups.com
You need the nightly build version.
Reply all
Reply to author
Forward
0 new messages