Could you try replace your download function with def download(): return response.download(request,db)
On Aug 4, 3:42 pm, jayvandal <jayvan...@gmail.com> wrote: > Hi. > I am trying the "Images" in the manual and I am on page 61 . > I tried to select all and copy the error info. Is there a better way > to copy the error info? > Thanks > > Error ticket for "images" > Ticket 127.0.0.1.2009-08-04.14-35-15.67e6ba82-76c8-4172-8868- > dfc459e24fd2 > > Error traceback > 1.2.3.4.5.6.7.8.9. Traceback (most recent call last): File "gluon/ > restricted.py", line 178, in restricted File "C:/web2py_win(2)/web2py/ > applications/images/controllers/default.py", line 19, in <module> > File "gluon/globals.py", line 101, in <lambda> File "C:/web2py_win(2)/ > web2py/applications/images/controllers/default.py", line 9, in show > File "gluon/sqlhtml.py", line 743, in accepts File "gluon/html.py", > line 1135, in acceptsTypeError: 'NoneType' object is not iterable > > In file: C:\web2py_win(2)\web2py\applications\images/controllers/ > default.py > 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20. def index(): > images=db().select(db.image.ALL,orderby=db.image.title) return dict > (images=images) def show(): image=db(db.image.id==request.args > [0]).select()[0] form=SQLFORM(db.comment,fields= > ['author','email','body']) form.vars.image_id=image.id if > form.accepts(request.vars.session): response.flash='your comment > is posted' comments=db(db.comment.image_id==image.id).select() > return dict(image=image,comments=comments,form=form) def download > (): import os path=os.path.join(request.folder,'uploads',request.args > [0]) return response.stream(path)response._vars=response._caller > (show) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---