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