Could anybody explain the following traceback to me?
db.define_table...
Field('slug', unique=True, required=True),
....
)
db.page.slug.requires = IS_NOT_IN_DB(db, 'page.slug')
form = SQLFORM.factory(db.page.slug, Field('tags'))
Produces the following error on form.accepts(), works fine if without the
validator
Traceback (most recent call last):
File "/home/thadeusb/Applications/web2py/gluon/restricted.py", line 184,
in restricted
exec ccode in environment
File
"/home/thadeusb/Applications/web2py/applications/thadeusb0/controllers/weblog.py",
line 198, in <module>
File "/home/thadeusb/Applications/web2py/gluon/globals.py", line 103, in
<lambda>
self._caller = lambda f: f()
File
"/home/thadeusb/Applications/web2py/applications/thadeusb0/controllers/weblog.py",
line 96, in test
if form.accepts(request.vars, session):
File "/home/thadeusb/Applications/web2py/gluon/sqlhtml.py", line 775, in
accepts
onvalidation,
File "/home/thadeusb/Applications/web2py/gluon/html.py", line 1270, in
accepts
status = self._traverse(status)
File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in
_traverse
newstatus = c._traverse(status) and newstatus
File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in
_traverse
newstatus = c._traverse(status) and newstatus
File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in
_traverse
newstatus = c._traverse(status) and newstatus
File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in
_traverse
newstatus = c._traverse(status) and newstatus
File "/home/thadeusb/Applications/web2py/gluon/html.py", line 459, in
_traverse
newstatus = self._validate()
File "/home/thadeusb/Applications/web2py/gluon/html.py", line 1077, in
_validate
(value, errors) = validator(value)
File "/home/thadeusb/Applications/web2py/gluon/validators.py", line 403,
in __call__
rows = self.dbset(field == value).select(limitby=(0, 1))
File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 2941, in
select
query = self._select(*fields, **attributes)
File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 2828, in
_select
fields = [self._db[table].ALL for table in self._tables]
File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 1231, in
__getitem__
return dict.__getitem__(self, str(key))
KeyError: 'no_table'
-Thadeus
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.