this:

id = db.pictures.insert(image =
db.pictures.image.store(request.vars.image),words=[id], entry_by=who)

should be

id = db.pictures.insert(image =
db.pictures.image.store(request.vars.image.file),words=[id],
entry_by=who)

On Dec 25, 12:00 pm, "Arun K.Rajeevan" <[email protected]> wrote:
> db.mytable.insert(image=db.mytable.image.store(request.vars.image))  
> will not work
> ---------------------------------------------------------------------------------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/media/KRA/Evolve/Work/web2py_src_downloaded/google_appengine/visuallingua/gluon/restricted.py",
> line 188, in restricted
>     exec ccode in environment
>   File
> "/media/KRA/Evolve/Work/web2py_src_downloaded/google_appengine/visuallingua/applications/init/controllers/default.py",
> line 242, in <module>
>   File
> "/media/KRA/Evolve/Work/web2py_src_downloaded/google_appengine/visuallingua/gluon/globals.py",
> line 95, in <lambda>
>     self._caller = lambda f: f()
>   File
> "/media/KRA/Evolve/Work/web2py_src_downloaded/google_appengine/visuallingua/applications/init/controllers/default.py",
> line 121, in search
>     id = db.pictures.insert(image =
> db.pictures.image.store(request.vars.image),words=[id], entry_by=who)
>   File
> "/media/KRA/Evolve/Work/web2py_src_downloaded/google_appengine/visuallingua/gluon/dal.py",
> line 4238, in store
>     shutil.copyfileobj(file, dest_file)
>   File "/usr/lib/python2.6/shutil.py", line 27, in copyfileobj
>     buf = fsrc.read(length)
>   File "/usr/lib/python2.6/cgi.py", line 522, in __getattr__
>     raise AttributeError, name
> AttributeError: read

Reply via email to