FILEDELETE overwrite stopped (?) working

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

FILEDELETE overwrite stopped (?) working

by azbob on Tue Aug 16, 2016 5:25 pm

Configuration: Surface Pro 2, Win 10, Firefox 47.0.1, iMacros Standard Edition (x86) Version 11.0.246.4051
Hi,
I have a macro that has been running for months extracting data to csv files for use in other form fill macros. Here is the code I have been using to extract then overwrite prior data and save new.

TAG POS=1 TYPE=TD ATTR=ID:lowLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:hiLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:ctLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:lowSP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:hiSP EXTRACT=TXT
TAG POS=1 TYPE=SPAN ATTR=ID:ctSP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:avgDom EXTRACT=TXT
'Average LP
TAG POS=1 TYPE=TD ATTR=ID:avgLP EXTRACT=TXT
'Average SP
TAG POS=1 TYPE=TD ATTR=ID:avgSP EXTRACT=TXT
'Overwrite old data
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Chasedata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\BBformdata FILE=Chasedata.csv
Now what happens is new data is appended to prior. See attached output file.
Thanks
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: FILEDELETE overwrite stopped (?) working

by chivracq on Tue Aug 16, 2016 6:01 pm

azbob wrote:Configuration:
Code: Select all
Surface Pro 2, Win 10, Firefox 47.0.1, iMacros Standard Edition (x86) Version 11.0.246.4051

Hi,
I have a macro that has been running for months extracting data to csv files for use in other form fill macros. Here is the code I have been using to extract then overwrite prior data and save new.

Code: Select all
TAG POS=1 TYPE=TD ATTR=ID:lowLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:hiLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:ctLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:lowSP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:hiSP EXTRACT=TXT
TAG POS=1 TYPE=SPAN ATTR=ID:ctSP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:avgDom EXTRACT=TXT
'Average LP
TAG POS=1 TYPE=TD ATTR=ID:avgLP EXTRACT=TXT
'Average SP
TAG POS=1 TYPE=TD ATTR=ID:avgSP EXTRACT=TXT
'Overwrite old data
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Chasedata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\BBformdata FILE=Chasedata.csv

Now what happens is new data is appended to prior. See attached output file.
Thanks

Yeah, but do you run your Script in iMB11 or FF47...?, and if FF, which Version of iMacros for FF are you using...?
=> Run it in both Browsers to mention if it (still) works in one...

You didn't post your whole Script so I cannot see if you are using '!ERRORIGNORE', try disabling it (with an existing 'Chasedata.csv' File in place) to see if you get any RuntimeError...

I use a same Mechanism in one of my Macros and it works perfectly. But I'm using some "older" Version of iMacros for FF (v8.8.2, Pale Moon v26.3.3 (=FF47), Win10-x64).

No "output file" got attached to your Thread... (Needs to be zipped, Max 256Kb.)

Hum..., and you didn't follow up on / finish your previous Thread...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

by azbob on Tue Aug 16, 2016 6:41 pm

Imacros for FF 9.0.3
Hi,
Yeah still working on the previous thread...This happened today and in crunch to get work out.
Running under FF, imacros 9.0.3..
Using !ERRORIGNORE, so disabled and got this error:
"expected absolute paths are prohibited for security reason as parameter 1, line: 55 (Error code: -911)"
and Line 55 happens to be the filedelete:
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Chasedata.csv
I ran in IMB11 and it wrote data on 1st line of .csv file, but it put #EANF# in each cell!

Sorry ..I added the prior zip file
Attachments
Chasedata.zip
(184 Bytes) Downloaded 112 times
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: FILEDELETE overwrite stopped (?) working

by chivracq on Wed Aug 17, 2016 3:22 am

azbob wrote:Imacros for FF 9.0.3
Hi,
Yeah still working on the previous thread...This happened today and in crunch to get work out.
Running under FF, imacros 9.0.3..

Using !ERRORIGNORE, so disabled and got this error:
"expected absolute paths are prohibited for security reason as parameter 1, line: 55 (Error code: -911)"
and Line 55 happens to be the filedelete:
Code: Select all
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Chasedata.csv


I ran in IMB11 and it wrote data on 1st line of .csv file, but it put #EANF# in each cell!

Sorry ..I added the prior zip file

Chasedata.csv:
Code: Select all
"$199,000 ","$2,500,000 ",290,"$200,000 ","$1,100,000 ",201,69,"$394,821 ","$341,891 "

Sounds like a Bug/Limitation by Design in v9.0.3 for FF then...

But I checked my own Macro and the "Mechanism" that I implemented is actually a tiny little bit different and might work as a Workaround for you, apart from downgrading to v8.9.7, as it doesn't need any Absolute Path for 'FILEDELETE'...:

Instead of issuing the 'SAVEAS' and the 'FILEDELETE' to the iMacros 'Downloads' Folder (which requires Absolute Path then for both) like you, I do it in the (Default) 'Downloads' Folder for which for both Commands you don't need to specify any Path, just the Name of the File will do, and it's for the '!DATASOURCE' Command (for your other Macro reusing the Data) that I have to use the Absolute Path...! Or in your other Macro, you can (temporarily) set the Default 'Datasources' Folder to the 'Downloads' Folder using '!FOLDER_DATASOURCE'... :idea:

You still didn't react/follow up on your previous Thread... :roll: (I will stop answering your Threads if you don't follow up neatly on all of them...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

by azbob on Wed Aug 17, 2016 3:34 pm

Well there you have it..
Didn't want to mess with what worked. So I went back to V8.9.7.
I will be finishing up the other issue tomorrow and close out that post.
As it turns out it was affected by the absolute path issue as well.
Thanks for clearing this up.
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: FILEDELETE overwrite stopped (?) working

by Tom, Tech Support on Thu Aug 18, 2016 4:06 am

Hi azbob,

Thank you for reporting the FILEDELETE issue here! I am not sure if this is a bug or a new limitation, but I have logged it for follow-up by the development team.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: FILEDELETE overwrite stopped (?) working

by chivracq on Thu Aug 18, 2016 6:02 pm

azbob wrote:Well there you have it..
Didn't want to mess with what worked. So I went back to V8.9.7.
I will be finishing up the other issue tomorrow and close out that post.
As it turns out it was affected by the absolute path issue as well.
Thanks for clearing this up.

Oh yep, sorry about being so "pushy" about your previous Thread, I had misread/misunderstood your "Yeah still working on the previous thread...This happened today and in crunch to get work out."

Tom, Tech Support wrote:Hi azbob,

Thank you for reporting the FILEDELETE issue here! I am not sure if this is a bug or a new limitation, but I have logged it for follow-up by the development team.

Looks like a Bug to me, even if the (new) RuntimeError makes it believe it is a Limitation but it is then a very-very heavy (and rather useless) Limitation, or provide a (get/set) '!FOLDER_DOWNLOADS' Built-in Var...!
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

by jcdeadend01 on Sun Aug 28, 2016 5:19 pm

The FILEDELETE macro stopped working recently in a macro I've been using for months.

Using Firefox as browser.
Using Windows XP SP3

I haven't made any changes to iMacros, the operating system, the browser or the macro itself.

Macro is...

VERSION BUILD=8970419 RECORDER=FX

'---------------------------------------------------------------------------
' Constants
'---------------------------------------------------------------------------
SET Folder C:\Instagram
SET BackSlash \
SET File Instagram-Extract-meekismurder.csv


'---------------------------------------------------------------------------
' Set up the files to hold the extracted information.
'---------------------------------------------------------------------------
SET ExtractFile {{Folder}}
ADD ExtractFile {{BackSlash}}
ADD ExtractFile {{File}}
FILEDELETE NAME={{ExtractFile}}

Any ideas what's causing the problem or a way to work around it ?
jcdeadend01
 
Posts: 2
Joined: Sun Aug 28, 2016 5:02 pm

Re: FILEDELETE overwrite stopped (?) working

by chivracq on Mon Aug 29, 2016 11:59 am

jcdeadend01 wrote:The FILEDELETE macro stopped working recently in a macro I've been using for months.

Using
Code: Select all
Firefox as browser.
Windows XP SP3


I haven't made any changes to iMacros, the operating system, the browser or the macro itself.

Macro is...

Code: Select all
VERSION BUILD=8970419 RECORDER=FX

'---------------------------------------------------------------------------
' Constants
'---------------------------------------------------------------------------
SET Folder C:\Instagram
SET BackSlash \
SET File Instagram-Extract-meekismurder.csv


'---------------------------------------------------------------------------
' Set up the files to hold the extracted information.
'---------------------------------------------------------------------------
SET ExtractFile {{Folder}}
ADD ExtractFile {{BackSlash}}
ADD ExtractFile {{File}}
FILEDELETE NAME={{ExtractFile}}


Any ideas what's causing the problem or a way to work around it ?

FCIM...! :mrgreen: => Your FCI is a bit unclear...:
iMacros for FF v8.9.7 or v9.0.3...?, FF47/48...?, WinXP SP3.

You say "I haven't made any changes to iMacros, the operating system, the browser or the macro itself.", but I reckon iMacros updated itself to v9.0.3 for which the Behaviour for 'FILEDELETE' changed, like you can read from the previous Posts in this Thread.
'FILEDELETE' now (in v9.0.3) only works for the Default 'Downloads' Folder and I reckon your 'C:\Instagram' Folder is not your Default (iMacros) 'Downloads' Folder...
Or you revert to v8.9.7 and make sure to disable the Automatic Updates for iMacros...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

by jcdeadend01 on Mon Aug 29, 2016 7:13 pm

Thanks for the prompt reply.

The macro that was failing gets run automatically by the job scheduler so the version of iMacros I have could have gotten updated without me knowing (if that's how it's done).

Is it normal to introduce a change to how a command works without advance warning ? I had no idea what was going wrong for a day or two.
jcdeadend01
 
Posts: 2
Joined: Sun Aug 28, 2016 5:02 pm

Re: FILEDELETE overwrite stopped (?) working

by chivracq on Mon Aug 29, 2016 7:49 pm

jcdeadend01 wrote:Thanks for the prompt reply.

The macro that was failing gets run automatically by the job scheduler so the version of iMacros I have could have gotten updated without me knowing (if that's how it's done).

Is it normal to introduce a change to how a command works without advance warning ? I had no idea what was going wrong for a day or two.

Tja...!, you must know if you have disabled Automatic Updates for iMacros + Browser + OS and they should be disabled if you rely on running your Macro(s) from the Task Scheduler as any (Automatic) Update can break stg...
Checking your Config is the first thing to do in case of a Pb..., and you didn't answer my Qt about your exact FCI... :roll:

And about "normal" or not, you don't sound like you read the previous Posts in this Thread... TechSupport said they were (going to) investigate/ing if it's a Bug or a Limitation, meaning they didn't even know about it, and that's the Purpose of the Forum, Users reporting Bugs/Pb's etc..., especially when a new Version is deployed.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 3 guests

-->