On Aug 3, 4:33 pm, Jose <jjac...@gmail.com> wrote:
> I have just tried this in Windows XP(r1153) + python 2.5.x
> db.define_table('unatabla',
>     Field('nombre'),
>     Field('imagen', 'upload'),
> )
> The following mistake takes is produced when I do submit:
> Error traceback
>   File "E:\web2py2\gluon\sqlhtml.py", line 809, in accepts
>     if not f:
>   File "E:\Python25\lib\cgi.py", line 633, in __len__
>     return len(self.keys())
>   File "E:\Python25\lib\cgi.py", line 609, in keys
>     raise TypeError, "not indexable"
> TypeError: not indexable

Wow, the same error I had but with a simpler model!

In fact I can now reproduce this with just the simplest model:
db.define_table('test_photo',
                Field('image', 'upload'))

Therefore it's nothing weird about my code but a bug in sqlhtml.py

reverting the changed line 809 back to:
if f == '':

(from the current 'if not f:')

fixes it - patch sent to Massimo...

F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to