Error with DATASOURCE_LINE. Please help!!

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
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
ThePoro
Posts: 15
Joined: Sat Mar 09, 2019 7:23 am

Error with DATASOURCE_LINE. Please help!!

Post by ThePoro » Sat Apr 13, 2019 8:33 am

Hello,
I want to ask about this Error :
RuntimeError: Invalid DATASOURCE_LINE value: 2, line 3 (Error code: -951)
My code runs many times with no problem, It read lines in a csv file and check if a line exists or not. after a few minutes with infinity loop with no problem, iMacros appears this error.
Thank you


iMacros 8.9.7
Firefox 56
Windows 7
chivracq
Posts: 8626
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Error with DATASOURCE_LINE. Please help!!

Post by chivracq » Sun Apr 14, 2019 4:28 pm

ThePoro wrote:
Sat Apr 13, 2019 8:33 am
Hello,
I want to ask about this Error :
RuntimeError: Invalid DATASOURCE_LINE value: 2, line 3 (Error code: -951)
My code runs many times with no problem, It read lines in a csv file and check if a line exists or not. after a few minutes with infinity loop with no problem, iMacros appears this error.
Thank you

Code: Select all

iMacros 8.9.7
Firefox 56 
Windows 7
Hum..., being "nice"...! (I'm always a bit "allergic" to "Please Help" and "Urgent" in a Thread Title and usually "wait" for 1 Day before eventually answering those Threads, + 1 extra Day for each Exclamation Mark... :wink: )
And try to select the "correct" Sub-Forum when opening a new Thread, this one has nothing specific to iMacros for FF, I would think...

Yeah, well, Script not posted, but there are 3 "Possibilities" for the Error you are getting, and 1 can be excluded, and 1 is the most "plausible"...:
1- Your DataSource File is not 'UTF8 with BOM' formatted. This one can be excluded as you would already get some Error from the 1st Loop. (And I think the RuntimeError is different in that Case...)
2- If you compute "yourself" your Var for '!DATASOURCE_LINE' using 'EVAL()' (instead of using the "raw" '!LOOP'), that Var at some point returns some "_undefined_" or not >0 Integer. No Script posted, => I can't tell you if that's the Case...
3- And that's the "most plausible" Case, you've reached the End of the File or you have more than one Empty Line somewhere in the middle of your File.
=> 2 (or more) Empty Lines are "interpreted" by iMacros as "EOF"... At least on FF, but I think all Versions behave the same... Hum..., and I thought it was mentioned in the Wiki but nope, then OK, I must have seen it from some Thread on the Forum, or had the "Case" myself one day, several years ago...

EDIT:
Hum, wait, I notice only now the "value: 2" from your RuntimeError. Then maybe you have 2 empty Lines at the complete beginning of your File, which would trigger the "EOF" Case...
And stg that also happens is that if you have your '.CSV' File also opened in 'Excel' for example at the same time, the File is then "locked" by 'Excel' and iMacros cannot open it. But I think the RuntimeError is also different... Can also happen if the same (or another) Script writes simultaneously to the same '.CSV'. Depending on the Size of your '.CSV', iMacros needs about 50-100ms between the Write and the Read to the same File...
- (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...
Post Reply