"TypeError: filename is null, line: 11 (Error code: -1001)"

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
Shadowman
Posts: 5
Joined: Wed Dec 07, 2011 5:42 am

"TypeError: filename is null, line: 11 (Error code: -1001)"

Post by Shadowman » Wed Dec 07, 2011 5:57 am

Can someone please help me with this? I can't understand what's wrong. What file name!? I have given the default file names, that command isn't supposed to take any more parameters. The frame number is the exact same every time.

I am using the latest version of iMacros, with Windows XP SP2 and Firefox 8.0. The demo macros work okay and I haven't tried it on other browsers.

I want to save all of the history of international team results at FIFA.com However iMacro works much faster than the page loads. So I was told that this was my work-around it, to save an image I knew was on that page and at the very end. This way iMacro would be forced to wait until the whole page was loaded before proceding.

This is the link about the image loading: http://wiki.imacros.net/Web_Testing#Q:_ ... is_loaded., and I was directed there by the FAQ which said I should do that also if the page loads too fast in general.

Code: Select all

VERSION BUILD=7401110 RECORDER=FX
TAB T=1
URL GOTO=http://www.google.com
TAB T=1
SET !TIMEOUT_STEP 30
URL GOTO=http://www.fifa.com/worldfootball/results/index.html#
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:rangeDate CONTENT=%5
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:matchSearchForm ATTR=ID:searchBtnID

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=1 TYPE=IMG ATTR=SRC:*fifaLogo.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT 
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=1 TYPE=IMG ATTR=SRC:*fifaLogo.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT 
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2 

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=1 TYPE=IMG ATTR=SRC:*fifaLogo.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT 
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=1 TYPE=IMG ATTR=SRC:*fifaLogo.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT 
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2 

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=1 TYPE=IMG ATTR=SRC:*fifaLogo.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT 
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2 

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=1 TYPE=IMG ATTR=SRC:*fifaLogo.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT 
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2
Last edited by Shadowman on Wed Dec 07, 2011 7:24 pm, edited 1 time in total.
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Daniel, Tech Support » Wed Dec 07, 2011 12:31 pm

Hi,

Instead of SAVEAS, you should use ONDOWNLOAD FOLDER=* FILE=* WAIT=YES before TAG...EVENT:SAVEITEM.
E.g.

Code: Select all

ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=1 TYPE=IMG ATTR=SRC:*fifaLogo.gif CONTENT=EVENT:SAVEITEM
Best regards,
Daniel, iOpus Support
Shadowman
Posts: 5
Joined: Wed Dec 07, 2011 5:42 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Shadowman » Wed Dec 07, 2011 7:23 pm

Thanks for your suggestion, I don't get an error anymore. I also had to ensure to put the ondownload folder after the clear as your example indicated. The later "saveas type" is for the scoring data I want.

However if you try it now (I updated the code in my post above), it still won't ensure the new page has loaded and will continue to run ahead with the script and extract the same values multiple times.

Maybe it's running as thought, but the fifalogo image is still there from last time or something? What do you suggest I do to get it to run right?
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Daniel, Tech Support » Thu Dec 08, 2011 8:33 am

Hi,

As a fast and simplest solution, would it make sense to simply add WAIT SECONDS=1 after each loop?

Best regards,
Daniel, iOpus Support
Shadowman
Posts: 5
Joined: Wed Dec 07, 2011 5:42 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Shadowman » Thu Dec 08, 2011 7:27 pm

Daniel, iOpus wrote:Hi,

As a fast and simplest solution, would it make sense to simply add WAIT SECONDS=1 after each loop?

Best regards,
It would make some sense to put WAIT SECONDS=10 or so to forcibly do it, but it could skip data by saving the duplicate and skipping over the next page.

Say if the server takes 15 seconds to send the data at one point, then imacro is saving the duplicate of the one that was previously there, and it will also click "next" again. But by the time imacro checks again the pages will have gone two ahead because it will have clicked twice.

I tested this manually, if you click "next" twice while on the same data, it will jump ahead two pages. :(

Edit: I have now tried this also and it says it can't find it within 30 seconds well after it's loaded.: "TAG POS=1 TYPE=TXT ATTR=SRC:*</a></li></ul></div></div></div></div> CONTENT=EVENT:SAVEITEM" That text comes up at the end of the field/table I'm trying to obtain.
Shadowman
Posts: 5
Joined: Wed Dec 07, 2011 5:42 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Shadowman » Sat Dec 10, 2011 9:04 pm

I give up. I've tried every possible variation and they all either run through the code fast without waiting at all for the next page to show up (and continually clicking next so some results will never show), or they don't find what I want them to find at all. This one following actually does both for some strange reason: it goes through it lightening fast at first and then when the page has finally loaded it actually stops, the exact reverse of what I wanted it to do.

Can imacro somehow detect when the loading gif has stopped showing?

Can imacro use text or a position in the table that comes up and wait for it without all this stuff about saving images?

Code: Select all


VERSION BUILD=7401110 RECORDER=FX
TAB T=1
URL GOTO=http://www.google.com
TAB T=1
SET !TIMEOUT_STEP 30
URL GOTO=http://www.fifa.com/worldfootball/results/index.html#
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:rangeDate CONTENT=%5
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:matchSearchForm ATTR=ID:searchBtnID

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=20 TYPE=IMG ATTR=SRC:*.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=20 TYPE=IMG ATTR=SRC:*.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=20 TYPE=IMG ATTR=SRC:*.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=20 TYPE=IMG ATTR=SRC:*.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=20 TYPE=IMG ATTR=SRC:*.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2

CLEAR
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=20 TYPE=IMG ATTR=SRC:*.gif CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=TXT:Prev* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
TAG POS=1 TYPE=A ATTR=ID:next2
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Daniel, Tech Support » Mon Dec 12, 2011 10:15 pm

Hi,

I can come up with a more complex solution than waiting x seconds, but this would take you some time to implement:
Wait 5 seconds
Assign the old extract to !VAR1 (SET !VAR1 {{!EXTRACT}})
Extract the new data
Compare the !VAR and !EXTRACT with EVAL: http://wiki.imacros.net/EVAL and if results are equal (old data), return null value, else, return value of !EXTRACT
Save the data

Then you can simply delete all the empty lines from csv. Of course there is a better (cleaner) option involving using the Scripting Interface in case you are acquainted with any programming language.

Best regards,
Daniel, iOpus Support
Shadowman
Posts: 5
Joined: Wed Dec 07, 2011 5:42 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Shadowman » Sat Dec 17, 2011 7:34 pm

Daniel, forgive me if I'm being clueless here but what am I going to do with the statement after it's evaluated? I don't want it to process the next "tag" in the macro if the data is equal, so is there a way I can skip the next tag? If it processes the next TAG then it will go ahead and process the next page. It will not get the same data twice, true, however with no conditional it will still be tapping "next" every five seconds and so still be skipping some results.

page 3.
*clicks next* *waits five seconds* ===> new data = old data, do not save.

page 3.
*clicks next* *waits five seconds* ===> will save, but you have still clicked twice so it will try to get page 5 results.

In the FAQ about conditionals it says: "We did not add such statements as we do not think that our customers should have to attend week-long seminars just to learn yet another proprietary scripting or programming language."... and this the excuse given to not have the possibility for conditionals in the imacros. Eh...? All I want is for it to skip pressing next if the old and new data are the same, nobody has to force people to use conditionals if they were there as an option and they would be really useful sometimes.

Can I put the TAG command to click "next" inside the eval statement and have it only click if the current !EXTRACT is new data?

What if I perform the eval function again and have it return "null" or "next2" for putting into the TAG command? Will the TAG command accept putting a variable instead of "next2" after ATTR=ID: ?
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Daniel, Tech Support » Thu Dec 22, 2011 11:32 pm

Hi,
In the FAQ about conditionals it says: "We did not add such statements as we do not think that our customers should have to attend week-long seminars just to learn yet another proprietary scripting or programming language."... and this the excuse given to not have the possibility for conditionals in the imacros. Eh...? All I want is for it to skip pressing next if the old and new data are the same, nobody has to force people to use conditionals if they were there as an option and they would be really useful sometimes.
Instead of developing a new programming language and have our users learn it and pay for added cost of development and support, we created the iMacros Scripting Interface, which allows you to use conditionals or any other functionality of a programming language of your choice.

You can definitely automate this task using the Scripting Interface. Just let me know if you want to take that path and if you have questions regarding the Scripting Interface.

Best regards,
Daniel, iOpus Support
vsalunke
Posts: 8
Joined: Tue Jun 19, 2012 5:38 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by vsalunke » Thu Sep 27, 2012 8:09 am

Hey guyes,

help me out....asap i am stuck again. :)

What should i do for this error.

TypeError: can't access dead object, line: 197 (Error code: -1001)


TAB T=2
WAIT SECONDS = 3
CLICK X=676 Y=383
WAIT SECONDS = 3
CLICK X=584 Y=47
WAIT SECONDS = 3
CLICK X=451 Y=44 CONTENT=C:\Documents<SP>and<SP>Settings\vsalunke\Desktop\wallpapers\Skull_HD_Wallpaper.jpg
WAIT SECONDS = 3
CLICK X=901 Y=258
WAIT SECONDS = 3
CLICK X=288 Y=48
WAIT SECONDS = 3
CLICK X=932 Y=385
WAIT SECONDS = 3
CLICK X=553 Y=447

On the last line its is throwing me this error. It has image uploading functionality here.
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by Daniel, Tech Support » Mon Oct 01, 2012 9:56 am

Hi,

Could you please provide a few more details: what is the iMacros version you're using, what is the website? Can we reproduce it?

Thanks,
Daniel, iOpus Support
User avatar
nileearls
Posts: 14
Joined: Wed May 09, 2012 6:53 pm
Location: fort worth, texas

Re: "TypeError: filename is null, line: 11 (Error code: -100

Post by nileearls » Thu Nov 01, 2012 3:27 pm

DANIEL OPUS

CAN YOU HELP ME WITH A SIMPLE IMACRO
I NEED HELP WITH liking and following and favoriting and commenting on user id

i noticed it wont go to the next page
and if it does it only goes to the EXACT SAME user id.
why so.

i want to add people on a couple sites quickly . so how can i send you my imacro?
facebook.com/teaamfollowback
Post Reply