I followed this <http://www.web2pyslices.com/slice/show/1387/upload-image-and-make-a-thumbnail> example with this code db.define_table('article', Field("title"), Field("article_text", "text"), Field("picture", "upload"), Field("thumbnail", "upload") ) from images import THUMB from smarthumb import SMARTHUMB box = (200, 200), db.article.thumbnail.compute = lambda row: SMARTHUMB(row.picture, box)
db.define_table('uploads', Field('name','string'), Field('mainfile','upload'), Field('thumb','upload',writable=False,readable=False), ) I get this error: File "/home/mauricewaka/web2py/applications/bot/modules/smarthumb.py", line 21, in SMARTHUMB while img.size[0] / factor > 2 * box[0] and img.size[1] * 2 / factor > 2 * box[1]: TypeError: '>' not supported between instances of 'float' and 'tuple' My path is: img = Image.open(request.folder + '/uploads/' + image) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/b87d8f2e-f91c-4875-ac50-b7a088065d19%40googlegroups.com.