[web2py] Re: RuntimeError: Unable to handle upload

2013-02-05 Thread Bill Thayer
Hi Alan. Seeing your code must have helped because I did get it to run. The following shows a demo script with functions to upload a file and download a file utilizing a table containing a blob field. It worked twice on a pdf for me. Note that I had to change the filename type from 'upload' to

[web2py] Re: RuntimeError: Unable to handle upload

2013-02-03 Thread Alan Etkin
> > Yes. That is what I meant. I even chased down the call in the code to see > where you got it. Tried this in a console and it works, I could not reproduce the error. # myfile is an open file object file_id=db.mytable.insert(myupload=db.mytable.myupload.store(myfile, filename="myfile

[web2py] Re: RuntimeError: Unable to handle upload

2013-02-02 Thread Bill Thayer
Yes. That is what I meant. On Saturday, February 2, 2013 1:49:55 PM UTC-6, Alan Etkin wrote: > > Your code also threw the same error so before I un-commented the if >> statements in dal.py I added some print statements >> > > Did you try the store command as I posted it (passing pathname and > f

[web2py] Re: RuntimeError: Unable to handle upload

2013-02-02 Thread Alan Etkin
> Your code also threw the same error so before I un-commented the if > statements in dal.py I added some print statements > Did you try the store command as I posted it (passing pathname and filename) without changing dal.py? What is the error output? -- --- You received this message beca

[web2py] Re: RuntimeError: Unable to handle upload

2013-02-02 Thread Bill Thayer
So I just replaced the first if statement with 'if True:' so that the code would execute. Looks like a unicode object does not have an attribute 'file' (InteractiveConsole) >>> import test_tamoto_rpc as trpc >>> trpc.upload_file() C:\Users\bthayer\Documents\car\carfiles.txt wiki_media.id wiki_m

[web2py] Re: RuntimeError: Unable to handle upload

2013-02-02 Thread Bill Thayer
Hi Alan, Just now getting back to this days later... Your code also threw the same error so before I un-commented the if statements in dal.py I added some print statements and can see the list of fields, then the name of the filename field as 'filename' followed by wiki_media.filename.9b724ad1

[web2py] Re: RuntimeError: Unable to handle upload

2013-01-29 Thread Alan Etkin
Replacing the store call with this should avoid the error: file_id=db.wiki_media.insert(filename=db.wiki_media.filename.store(stream,filename =, path=file_path) -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this gro

[web2py] Re: RuntimeError: Unable to handle upload

2013-01-29 Thread Alan Etkin
I did not explain well what I meant: File "C:\web2py-1045bab06391\web2py-1045bab06391\gluon\dal.py", line 8258, in _attempt_upload raise RuntimeError("Unable to handle upload") It seems that dal is returning a generic message so my idea was to take out any exception handling in the dal.py m

[web2py] Re: RuntimeError: Unable to handle upload

2013-01-29 Thread Bill Thayer
Hi Allen, Yes the book has the example as written because I am uploading directly to the database. Otherwise I get an error that store requires a value for uploadfolder. Sorry but I've been looking for how t temporarily not let the dal catch the error. I tried running my app with the -S optio

[web2py] Re: RuntimeError: Unable to handle upload

2013-01-29 Thread Alan Etkin
> > I am attempting to write a function that will eventually go in to a > migration script to upload legacy data files. As you can see I "Unable to handle load" is too generic for this case. I'd better temporarily let dal not to catch the error so there's a more precise description of it. Pe