Problem with duplicate last line write

I'm new to screen-scraper and this forum, so apologies if I don't give enough info in this first post....

I took an example from the documentation and am trying to read in a .csv file of part numbers, scrape data on those parts, and write that back to a file.

I am getting everything to work except my output file has the last part number and associated info written twice. Any help would be much appreciated! I am posting the Initialization file. I am assuming the problem is here, but could obviously be wrong.

----------------------------------------------------

import java.io.*;

session.setVariable("INPUT_FILE", "S:\\ScreenScraper\\partNumbers.csv");

BufferedReader buffer = new BufferedReader(new FileReader(session.getVariable("INPUT_FILE")));

while ( (line = buffer.readLine()) != null ){
session.setVariable("PartNumber", line);
session.log("***Beginning PN " + session.getVariable("PartNumber"));
session.scrapeFile("Seller");
session.scrapeFile("Item All Seller Info");
}

------------------------------------------------------

Thank You So Much

To whoever you are...... You're my hero today! That was all it was and I spent 2 days trying to figure out the problem or how to work around it. Thanks Again!

I suspect that I know what's

I suspect that I know what's happening.

The script is calling the scrapeable file "seller" for each row in the CSV, but the scrapeable file is also set to run in sequence, so that runs is once more. If you go to the properties tab and check "this scrapable file will be invoked manually from a script" I bet that will take care of it.