I got the following ticket when trying to upload an image via the
appadmin:

Traceback (most recent call last):
  File "C:\web2py\gluon\restricted.py", line 178, in restricted
    exec ccode in environment
  File "C:/web2py/applications/myapp/controllers/appadmin.py", line
410, in <module>
  File "C:\web2py\gluon\globals.py", line 96, in <lambda>
    self._caller = lambda f: f()
  File "C:/web2py/applications/myapp/controllers/appadmin.py", line
275, in update
    if form.accepts(request.vars, session):
  File "C:\web2py\gluon\sqlhtml.py", line 862, in accepts
    if not request_vars.get(key,None) \
  File "C:\Program Files\Python25\Lib\cgi.py", line 633, in __len__
    return len(self.keys())
  File "C:\Program Files\Python25\Lib\cgi.py", line 609, in keys
    raise TypeError, "not indexable"
TypeError: not indexable


The image field is defined as follows:

  Field('avatar','upload',label=T('Image'),autodelete=True,
    uploadfolder=PATH,
 
requires=(IS_NULL_OR(IS_IMAGE()),IS_NULL_OR(IS_LENGTH(100000,10)))),

Any ideas?

Reply via email to