Traceback (most recent call last):
File "/Users/chris/Dropbox/workspace/chris/gluon/restricted.py",
line 173, in restricted
exec ccode in environment
File "/Users/chris/Dropbox/workspace/chris/applications/init/
controllers/appadmin.py", line 410, in <module>
File "/Users/chris/Dropbox/workspace/chris/gluon/globals.py", line
96, in <lambda>
self._caller = lambda f: f()
File "/Users/chris/Dropbox/workspace/chris/applications/init/
controllers/appadmin.py", line 275, in update
if form.accepts(request.vars, session):
File "/Users/chris/Dropbox/workspace/chris/gluon/sqlhtml.py", line
844, in accepts
if not request_vars.get(key, None) \
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/cgi.py", line 624, in __len__
return len(self.keys())
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/cgi.py", line 600, in keys
raise TypeError, "not indexable"
TypeError: not indexable
On Mar 17, 1:06 pm, mdipierro <[email protected]> wrote:
> Can you post the complete traceback?
>
> On Mar 17, 12:03 pm, Chris <[email protected]> wrote:
>
> > Hi,
> > I have an upload field in my database that looks like this:
>
> > db.define_table('page',
> > Field('book_id', db.book, required=True),
> > Field('number', 'integer', required=True),
> > Field('body', 'text', required=True),
> > Field('image', 'upload', autodelete=True),
> > )
>
> > db.page.image.requires = IS_NULL_OR(IS_IMAGE())
>
> > If I try to edit a record in appadmin by uploading a non-image file I
> > get this traceback error:
>
> > TypeError: not indexable
>
> > Inserting a record with a non-image file displays the proper error
> > message "invalid image" in the form.
>
> > Chris
--
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.