RuntimeError: ONDOWNLOAD csv

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
deadlock2004
Posts: 9
Joined: Thu Jan 30, 2014 2:24 am

RuntimeError: ONDOWNLOAD csv

Post by deadlock2004 » Thu Jan 30, 2014 2:38 am

Hi,

I have been going through the forum for the past 3 months and finding a way around the ondownload error without success. RuntimeError: ONDOWNLOAD command was used but no download occurred. (Error code: -804)

The following is my code

TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:frmParam ATTR=NAME:chkDateFrom CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:frmParam ATTR=NAME:chkDateTo CONTENT=YES
TAG POS=2 TYPE=INPUT:RADIO FORM=NAME:frmParam ATTR=NAME:chkReportType CONTENT=YES
ONDOWNLOAD FOLDER=D:\somefolder\ FILE=*
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:frmParam ATTR=NAME:cmdDown
WAIT SECONDS=10

I am using Firefox 26 and imacros 8.6.
I am downloading a CSV file and it is set at OPTIONS to ALWAYS ASK
i have tried different combinations of EVENT, HTML EXPERT and conventional for the download TAG without success.
- EVENT continues up to wait seconds = 10 but still returns and runtime error. Dialog box with the save button just sits there.
- Conventional and Html is stuck at the TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:frmParam ATTR=NAME:cmdDown and just timeouts from there. Dialog box with the save button just sits there.

The Demo Function - Download works fine.
Last edited by deadlock2004 on Fri Jan 31, 2014 2:46 am, edited 1 time in total.
chivracq
Posts: 9378
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: RuntimeError: ONDOWNLOAD csv

Post by chivracq » Thu Jan 30, 2014 6:34 am

Without the URL of the Site, there is not much we can test...

But a YES and a YES as CONTENT for a DateFrom and a DateTo look strange to me...

Maybe the Technique I used in this Thread can be of some help...:
http://forum.imacros.net/viewtopic.php?t=22303
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
deadlock2004
Posts: 9
Joined: Thu Jan 30, 2014 2:24 am

Re: RuntimeError: ONDOWNLOAD csv

Post by deadlock2004 » Thu Jan 30, 2014 9:01 am

My code works fine with the imacros browser, but I would want it to work in firefox instead.
chivracq
Posts: 9378
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: RuntimeError: ONDOWNLOAD csv

Post by chivracq » Thu Jan 30, 2014 1:03 pm

deadlock2004 wrote:My code works fine with the imacros browser, but I would want it to work in firefox instead.
Yeap, sorry my previous msg was a bit stupid, a YES is normal for a CheckBox..., I only focused on "Date" and didn't pay attention that your Script actually hangs at the CommandButton...

Not clear if the Script you posted was recorded with the iMacros Browser or with Firefox, but I would try to record your Macro (again) with Firefox and to compare the Content of that Line..., because you don't mention what kind of RuntimeError you get, but it sounds like "Element not found"...

The Button is not an Image which is changing with MouseOver? Because iMacros (for FF) then records the wrong Image...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
deadlock2004
Posts: 9
Joined: Thu Jan 30, 2014 2:24 am

Re: RuntimeError: ONDOWNLOAD csv

Post by deadlock2004 » Fri Jan 31, 2014 2:46 am

It is a runtime error from the ondownload function. Works fine at imacros. Firefox does not record the ondownload command, i placed that there before the tag command that calls the download. Edited the topic to include the runtime error.

RuntimeError: ONDOWNLOAD command was used but no download occurred. (Error code: -804)
TheOwl
Posts: 3
Joined: Sat May 18, 2013 10:57 pm

Re: RuntimeError: ONDOWNLOAD csv

Post by TheOwl » Mon Feb 24, 2014 7:38 am

i also use iMacros for FF. I had a similar problem with ONDOWNLOAD errors. What i did was, at the beginning of the script, i placed SET !ERRORIGNORE. That line blocks all the errors from ondownload. if you have separate consecutive downloads in the script (like a query list), imacros will now wait for a file to finish downloading before downloading the next file. I also unchecked the "always ask" setting in firefox. you won't be able to change the name of the file that you're downloading, but you can change the download destination of all files in FF settings. Also try moving your ONDOWNLOAD line to the top.
deadlock2004
Posts: 9
Joined: Thu Jan 30, 2014 2:24 am

Re: RuntimeError: ONDOWNLOAD csv

Post by deadlock2004 » Wed Jan 06, 2016 1:21 am

Hi,

Can't really seem to have the firefox ondownload command to work on the specific page i'm working on. So I ended up transferring all the codes to the Imacros Browser instead.
Post Reply