Do you get the error only with IS_IMAGE?

On Apr 27, 2:52 am, hywang <[email protected]> wrote:
> web2py  Ver 1.77.3
>
> db.define_table('test_pic',
>     Field('picture', 'upload')
> )
>
> def hello():
>     form = SQLFORM(db.test_pic)
>     if form.accepts(request.vars, session):
>         response.flash = 'ok'
>     return dict(form=form)
>
> it works well.
>
> when add validator IS_IMAGE
> db.define_table('test_pic',
>     Field('picture', 'upload', requires=IS_IMAGE(extensions=('png')))
> )
>
> an error occurs :
> ERROR:Rocket.Errors.Thread-7:Traceback (most recent call last):
>   File "E:\web2py\gluon\rocket.py", line 747, in run
>     self.run_app(conn)
>   File "E:\web2py\gluon\rocket.py", line 1162, in run_app
>     sections = len(output)
>   File "C:\Python25\lib\cgi.py", line 633, in __len__
>     return len(self.keys())
>   File "C:\Python25\lib\cgi.py", line 609, in keys
>     raise TypeError, "not indexable"
> TypeError: not indexable
>
> This error also reproduced on different platforms
>
> --
> Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en

Reply via email to