def changedp():
    dpform=SQLFORM.factory(Field('img','upload', 
uploadfolder=os.path.join(request.folder,'uploads/')),table_name='info').process()
    if dpform.accepts(request.vars,session,formname="dpformm"):
        basewidth = 300
        img = Image.open("{{=URL('uploads',dpform.vars.img)}}")
        wpercent = (basewidth/float(img.size[0]))
        hsize = int((float(img.size[1])*float(wpercent)))
        img = img.resize((basewidth,hsize), PIL.Image.ANTIALIAS)
        img.save("{{=URL('uploads',dpform.vars.img)}}")
   return locals()

{{extend 'layout.html'}}
{{=dpform}}
        

and the error says:
<type 'exceptions.IOError'> [Errno 2] No such file or directory: 
"{{=URL('uploads',dpformm.vars.img)}}"

also is img.save("{{=URL('uploads',dpform.vars.img)}}")    correct as 
syntax?
How should I correct these?

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to