Initially this example didn't run for me on postgresql. I assume that this is because 'page' is a reserved word...changed the table name to 'webpage' and all was good.
On May 2, 7:04 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > If you comment this line: > > db.document.page_id.requires = IS_IN_DB(db, 'page.id', '%(title)s') > > do you get the errors? > > Which web2py version? > > On Apr 30, 10:43 pm, nic <nicats...@gmail.com> wrote: > > > Hello All, > > > I am trying to run the wiki example from the book on gae. > > It is running fine on my local machine using cherrypy but will not run > > on the gae. > > > The error seems to be coming from index() in default.py > > > I believe there may be an error in the book that may or may not be > > related > > > In Section 3.9 A Wiki in the source of the model: > > Line 39 says db.comment.page_id.requires = IS_IN_DB(db, 'page.id', > > ') > > Line 48 says db.document.page_id.requires = IS_IN_DB(db, > > 'page.id', ') > > I believe this is in error as the inverted quotes are not even. > > > Whereas the source from the pdf book I purchased a few months ago > > says: > > db.comment.page_id.requires = IS_IN_DB(db, 'page.id', '%(title)s') > > db.document.page_id.requires = IS_IN_DB(db, 'page.id', '% > > (title)s') > > > Any help appreciated ... > > > The log from the gae shows: > > > Traceback (most recent call last): > > File "/Applications/web2py/gluon/restricted.py", line 178, in > > restricted > > exec ccode in environment > > File "/Applications/web2py_2gae/applications/nikiWiki/controllers/ > > default.py:index", line 106, in <module> > > File "/Applications/web2py/gluon/globals.py", line 96, in <lambda> > > self._caller = lambda f: f() > > File "/Applications/web2py_2gae/applications/nikiWiki/controllers/ > > default.py:index", line 12, in index > > File "/Applications/web2py/gluon/contrib/gql.py", line 676, in > > select > > (items, tablename, fields) = self._select(*fields, **attributes) > > File "/Applications/web2py/gluon/contrib/gql.py", line 628, in > > _select > > table = self._get_table_or_raise() > > File "/Applications/web2py/gluon/contrib/gql.py", line 607, in > > _get_table_or_raise > > raise SyntaxError, 'Set: no tables selected' > > SyntaxError: Set: no tables selected