I encountered the same error because I tried to point the
handler.script field in app.yaml to web2py.py. I changed to
gaehandler.py and it worked.

So in app.yaml instead of -

handlers:
- url: .*
  script: web2py.py

I used -

handlers:
- url: .*
  script: gaehandler.py

Hope that helps.

Regards,
Arbie

On Mar 24, 10:19 am, Web2py Newbie
<swiawte...@garrifulio.mailexpire.com> wrote:
> Hi
>
> I have done a short app (actually just a couple of web pages strung
> together) that I wanted to load to the google app engine.  When I try
> to hook up web2py: python2.5 dev_appserver.py web2py
> the app starts, but fails when I load the page in a browser:
>
> ERROR    2011-03-23 23:00:16,549 dev_appserver.py:3285] Exception
> encountered handling request
> Traceback (most recent call last):
>   File "/data-current/programming/python/gae/google_appengine/google/
> appengine/tools/dev_appserver.py", line 3245, in _HandleRequest
>     self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
>   File "/data-current/programming/python/gae/google_appengine/google/
> appengine/tools/dev_appserver.py", line 3186, in _Dispatch
>     base_env_dict=env_dict)
>   File "/data-current/programming/python/gae/google_appengine/google/
> appengine/tools/dev_appserver.py", line 531, in Dispatch
>     base_env_dict=base_env_dict)
>   File "/data-current/programming/python/gae/google_appengine/google/
> appengine/tools/dev_appserver.py", line 2410, in Dispatch
>     self._module_dict)
>   File "/data-current/programming/python/gae/google_appengine/google/
> appengine/tools/dev_appserver.py", line 2320, in ExecuteCGI
>     reset_modules = exec_script(handler_path, cgi_path, hook)
>   File "/data-current/programming/python/gae/google_appengine/google/
> appengine/tools/dev_appserver.py", line 2216, in ExecuteOrImportScript
>     exec module_code in script_module.__dict__
>   File "/data-current/programming/python/gae/web2py/web2py.py", line
> 9, in <module>
>     os.chdir(path)
> AttributeError: 'module' object has no attribute 'chdir'
>
> Any ideas on what's going on/how to fix?
> web2py version is most recent stable from the website this morning
> (1.94.5)
> Python version is Python 2.5.5 (r255:77872, Mar 24 2011, 09:36:33),
> but I get the same failure using python2.6
>
> Brendan

Reply via email to