That worked! Thanks Massimo. I downloaded the latest and that got rid of the error. Also I restored the try-catch block.
Thanks, Arbie On May 20, 11:40 pm, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: > I think you have an old GAE SDK. > > Massimo > > On May 20, 10:05 am, Arbie Samong <phek...@gmail.com> wrote: > > > Hi Massimo, > > > I removed the try and except leaving the block. It says "ImportError: > > cannot import name rdbms" > > > Traceback (most recent call last): > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 3245, in _HandleRequest > > self._Dispatch(dispatcher, self.rfile, outfile, env_dict) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 3186, in _Dispatch > > base_env_dict=env_dict) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 531, in Dispatch > > base_env_dict=base_env_dict) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 2410, in Dispatch > > self._module_dict) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 2320, in ExecuteCGI > > reset_modules = exec_script(handler_path, cgi_path, hook) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 2216, in ExecuteOrImportScript > > exec module_code in script_module.__dict__ > > File ".../myproject/web2py/gaehandler.py", line 59, in <module> > > import gluon.main > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1945, in load_module > > return self.FindAndLoadModule(submodule, fullname, search_path) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1847, in FindAndLoadModule > > description) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1798, in LoadModuleRestricted > > description) > > File ".../myproject/web2py/gluon/main.py", line 80, in <module> > > from globals import Request, Response, Session > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1945, in load_module > > return self.FindAndLoadModule(submodule, fullname, search_path) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1847, in FindAndLoadModule > > description) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1798, in LoadModuleRestricted > > description) > > File ".../myproject/web2py/gluon/globals.py", line 18, in <module> > > from compileapp import run_view_in > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1945, in load_module > > return self.FindAndLoadModule(submodule, fullname, search_path) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1847, in FindAndLoadModule > > description) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1798, in LoadModuleRestricted > > description) > > File ".../myproject/web2py/gluon/compileapp.py", line 24, in > > <module> > > from sql import BaseAdapter, SQLDB, SQLField, DAL, Field > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1945, in load_module > > return self.FindAndLoadModule(submodule, fullname, search_path) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1847, in FindAndLoadModule > > description) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1798, in LoadModuleRestricted > > description) > > File ".../myproject/web2py/gluon/sql.py", line 5, in <module> > > from dal import DAL, Field, Table, Query, Set, Expression, Row, > > Rows, drivers, BaseAdapter, SQLField, SQLTable, SQLXorable, SQLQuery, > > SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL, SQLCustomType > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1945, in load_module > > return self.FindAndLoadModule(submodule, fullname, search_path) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1847, in FindAndLoadModule > > description) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1295, in Decorate > > return func(self, *args, **kwargs) > > File ".../myproject/google/appengine/tools/dev_appserver.py", line > > 1798, in LoadModuleRestricted > > description) > > File ".../myproject/web2py/gluon/dal.py", line 269, in <module> > > from google.appengine.api import namespace_manager, rdbms > > ImportError: cannot import name rdbms > > > Thanks, > > Arbie > > > PS - (Off topic: is it advisable to enclose a whole class in a try > > block with the except clause containing only a pass?) > > > On May 20, 8:48 pm, Massimo Di Pierro <massimo.dipie...@gmail.com> > > wrote: > > > > Please help m debug this. In gluon/dal.py there is this code: > > > > try: > > > from new import classobj > > > from google.appengine.ext import db as gae > > > from google.appengine.api import namespace_manager, rdbms > > > from google.appengine.api.datastore_types import Key ### needed > > > for belongs \ > > > on > > > ID > > > from google.appengine.ext.db.polymodel import PolyModel > > > > drivers.append('google') > > > ... > > > except: > > > ... > > > > One of the imports fails for you. Can you please remove the > > > try:...except:... so we can get a traceback? > > > > On May 19, 11:04 pm, Arbie Samong <phek...@gmail.com> wrote: > > > > > Hi Massimo, > > > > > I tried to use python2.5 and I still get the same output: > > > > python2.5 dev_appserver.py web2py/ > > > > > Thanks, > > > > Arbie > > > > > On May 20, 11:44 am, Massimo Di Pierro <massimo.dipie...@gmail.com> > > > > wrote: > > > > > > appengine SDK requires python 2.5 > > > > > > On May 19, 9:47 pm, Arbie Samong <phek...@gmail.com> wrote: > > > > > > > Hello Massimo, thanks for the reply. I do: > > > > > > > python2.6 dev_appserver.py web2py/ > > > > > > > and my web2py project is in that web2py/ folder. > > > > > > > Thanks, > > > > > > ARbie > > > > > > > On May 20, 1:53 am, Massimo Di Pierro <massimo.dipie...@gmail.com> > > > > > > wrote: > > > > > > > > How are you starting web2py? Somehow it is not staring the google > > > > > > > libraies. > > > > > > > > On May 19, 9:24 am, Arbie Samong <phek...@gmail.com> wrote: > > > > > > > > > This is the error I get: > > > > > > > > > ERROR 2011-05-19 14:07:16,175 restricted.py:145] Traceback > > > > > > > > (most > > > > > > > > recent call last): > > > > > > > > File ".../gae/web2py/gluon/restricted.py", line 181, in > > > > > > > > restricted > > > > > > > > exec ccode in environment > > > > > > > > File ".../gae/web2py/applications/resume/models/db.py", line > > > > > > > > 9, in > > > > > > > > <module> > > > > > > > > db = DAL('gae') # connect to > > > > > > > > Google > > > > > > > > BigTable > > > > > > > > File ".../gae/web2py/gluon/dal.py", line 3720, in __init__ > > > > > > > > raise RuntimeError, "Failure to connect, tried 5 > > > > > > > > times:\n%s" % > > > > > > > > error > > > > > > > > RuntimeError: Failure to connect, tried 5 times: > > > > > > > > global name 'GAEDecimalProperty' is not defined > > > > > > > > > I made sure web2py and gae is updated. localhost:8000 works > > > > > > > > fine, but > > > > > > > > when I try it on the local gae in localhost:8080 the page loads > > > > > > > > from > > > > > > > > sometime and then the page says Internal error and the above > > > > > > > > stacktrace is what I see in the console. > > > > > > > > > Thanks for any help. > >