I added the issue and attached the patch file that is working for me. http://code.google.com/p/web2py/issues/detail?id=139&sort=-id
When testing I noticed if there are two applications using the same table name, it will create the same table in gae, without namespace on the table name. It won't affect me, but I can try fixing it if you tell me where to look. On Dec 26, 9:53 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > Can you please post a googlecode report and I will fix this asap? > Thanks > > On Dec 26, 11:08 pm, jinlin <wilkin...@gmail.com> wrote: > > > Thanks for the quick fix, I am pretty new with web2py, but had done > > some python programming on gae before. > > > The changes for gql.py has a syntax error. > > > from dal > > should be changed to > > from gluon.dal > > > There is another problem with GAENoSqlAdapter class. It doesn't handle > > a query like > > db().select(db.category.ALL) > > > The method GAENoSqlAdapter.select_raw assume query is not empty, so > > it will error in self.get_table(query) when it can not get the table. > > > def select_raw(self,query,fields=[],attributes={}): > > tablename = self.get_table(query) > > tableobj = self.db[tablename]._tableobj > > > Comparing with the old qgl it has code to check like so > > if fields and isinstance(fields[0], SQLALL): > > self._tables.insert(0, fields[0].table._tablename) > > > To reproduce the error, it is from the Reddish appliance. I changed > > the db() creation in db.py like you suggested. > > > Here is the stack trace > > if len(db().select(db.category.ALL))==0: > > File "/Documents/project/appengine/web2py/web2py/gluon/dal.py", line > > 4480, in select > > return self.db._adapter.select(self.query,fields,attributes) > > File "/Documents/project/appengine/web2py/web2py/gluon/dal.py", line > > 2654, in select > > (items, tablename, fields) = > > self.select_raw(query,fields,attributes) > > File "/Documents/project/appengine/web2py/web2py/gluon/dal.py", line > > 2611, in select_raw > > tablename = self.get_table(query) > > File "/Documents/project/appengine/web2py/web2py/gluon/dal.py", line > > 894, in get_table > > raise RuntimeError, "No table selected" > > RuntimeError: No table selected > >