not able to set correct datasource_line

Discussions and Tech Support specific to the iMacros for Chrome extension.
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
radis
Posts: 3
Joined: Wed Jul 30, 2014 3:13 pm

not able to set correct datasource_line

Post by radis » Wed Jul 30, 2014 4:00 pm

VERSION BUILD=8070701 RECORDER=CR
Windows 8
Chrome

Hello,

I have the following error
RuntimeError: Invalid DATASOURCE_LINE value: 1, line: 6

after running this macro :

VERSION BUILD=8070701 RECORDER=CR
SET !DATASOURCE urls.csv
SET !DATASOURCE_COLUMNS 1
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
URL GOTO={{!COL1}}
TAG POS=2 TYPE=A ATTR=TXT:Contact<SP>me
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:contact-name CONTENT=nomtest
TAG POS=1 TYPE=INPUT:EMAIL FORM=NAME:NoFormName ATTR=ID:contact-email CONTENT=emailtest
TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=ID:contact-message CONTENT=hello

I seem to have the same problem with demos.

My excel file is a list of url (so only 1 column and 5 lines for a test).
I would like to fill a form on the first one, then go the second one and fill the form, then go the third one etc

But my datasource_line is invalid.
I don't understand why.

Thank you very much for your much appreciated help.
chivracq
Posts: 9251
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: not able to set correct datasource_line

Post by chivracq » Wed Jul 30, 2014 4:43 pm

Hum..., sounds strange to me...

- You don't mention your CR Version, but iMacros v8.x for CR is only for CR35... If you still have CR34 or some Chrome based other Browser, you need to use v7.03.
- The File IO Component is needed for Macros from File (not from Bookmarks) but I wouldn't be surprised if it's needed as well when working with Datasources and doing SAVEAS's. Have you installed it...?
- If you have the same Problem with the 'Loop-Csv-2-Web.iim' Demo-Macro, I would think of some corruption, you could try reinstalling iMacros.
- Open your .CSV (and the Demo 'address.csv') in Notepad to see if you don't get any garbage/extra Characters from Excel and resave your File (in Notepad) with UTF-8 Encoding.
- Upload your .CSV. (You'll need to zip it, as only Images and .ZIP Files can be uploaded to the Forum...)
- Instead of Chrome, you can use Commodo Dragon (v33.1) (with iMacros v7.03 for CR) which works fine....
Last edited by chivracq on Mon Aug 18, 2014 7:20 pm, edited 1 time in total.
- (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...
radis
Posts: 3
Joined: Wed Jul 30, 2014 3:13 pm

Re: not able to set correct datasource_line

Post by radis » Wed Jul 30, 2014 5:22 pm

Thank you very much for your answer.

- my Chrome version is Version 36.0.1985.125 m
- I had installed File IO Component
- the demo Loop-Csv-2-Web.iim is still not working even thouh I reinstalled iMacros
- I cannot find the address.csv demo
- I will then try Comodo Dragon, do you think it's the only option then?

Thanks!
chivracq
Posts: 9251
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: not able to set correct datasource_line

Post by chivracq » Wed Jul 30, 2014 6:35 pm

CR35 broke iMacros v7.x for CR because of Changes in CR35 compared to CR34 and iMacros v8.x was the Response from iMacros, but I think I remember reading that a few other Changes were coming again with CR36... You are the first one to report some Problems with CR36, so wait and see...
- (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...
mcmama96
Posts: 9
Joined: Wed Jul 30, 2014 6:44 pm

Re: not able to set correct datasource_line

Post by mcmama96 » Wed Jul 30, 2014 7:32 pm

I am having the same issue. I hope it is ok to post on yours since the info is almost the same. I am running cr36, win XP, imacros 8. I get the error: RuntimeError: Invalid DATASOURCE_LINE value: 1, line: 5. I will let you know that it was running fine until a few days ago, just this week it quit. Also, the demo loop worked 3 times and then quit.

Below is my macro:
SET !REPLAYSPEED FAST
'SET !FILTER TYPE=IMAGES STATUS=ON
SET !DATASOURCE C:\AJSA\UPSTT.TXT
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !TIMEOUT_STEP 2
SET !ERRORIGNORE YES

VERSION BUILD=9002379
'TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://wwwapps.ups.com/ctc/request?loc=en_US

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:origPostal CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:destPostal CONTENT={{!COL2}}
'TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:ctcDatePicker CONTENT={{!COL3}}
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:form1 ATTR=NAME:ctc_submit


' Select LOCATION if that field exists
TAG POS=1 TYPE=SELECT FORM=NAME:form1 ATTR=NAME:dest_location CONTENT=#2
TAG POS=1 TYPE=SELECT FORM=NAME:form1 ATTR=ID:from_location CONTENT=#2
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:form1 ATTR=NAME:ctc_submit


SAVEAS TYPE=TXT FOLDER=C:\UPSTT FILE={{!COL4}}.TXT


Any help would be appreciated. Thank you!
chivracq
Posts: 9251
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: not able to set correct datasource_line

Post by chivracq » Thu Jul 31, 2014 9:05 am

mcmama96 wrote:I am having the same issue. I hope it is ok to post on yours since the info is almost the same. I am running cr36, win XP, imacros 8. I get the error: RuntimeError: Invalid DATASOURCE_LINE value: 1, line: 5. I will let you know that it was running fine until a few days ago, just this week it quit. Also, the demo loop worked 3 times and then quit.

Below is my macro:

Code: Select all

SET !REPLAYSPEED FAST
'SET !FILTER TYPE=IMAGES STATUS=ON
SET !DATASOURCE C:\AJSA\UPSTT.TXT
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !TIMEOUT_STEP 2
SET !ERRORIGNORE YES

VERSION BUILD=9002379
'TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://wwwapps.ups.com/ctc/request?loc=en_US

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:origPostal CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:destPostal CONTENT={{!COL2}}
'TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:ctcDatePicker CONTENT={{!COL3}}
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:form1 ATTR=NAME:ctc_submit

' Select LOCATION if that field exists
TAG POS=1 TYPE=SELECT FORM=NAME:form1 ATTR=NAME:dest_location CONTENT=#2
TAG POS=1 TYPE=SELECT FORM=NAME:form1 ATTR=ID:from_location CONTENT=#2
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:form1 ATTR=NAME:ctc_submit

SAVEAS TYPE=TXT FOLDER=C:\UPSTT FILE={{!COL4}}.TXT
Any help would be appreciated. Thank you!
It's perfect to post in this Thread, it's better to keep all Info related to the same Pb into one single Thread instead of having several (Duplicate) Threads to follow...

But "Also, the demo loop worked 3 times and then quit." sounds normal to me, the Address.csv Datasource only contains 3 Rows of Data (+ the Header).

Now you'll have to wait until TechSupport react, I cannot reproduce as I don't have Chrome installed, I only have Commodo Dragon (v33.1) which is not impacted...
- (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...
radis
Posts: 3
Joined: Wed Jul 30, 2014 3:13 pm

Re: not able to set correct datasource_line

Post by radis » Thu Jul 31, 2014 9:24 am

Hello,

I downloaded Firefox 31.0 and install iMacros on it.
Now, I got this error: Error: Component returned failure code: 0x80500001 [nsIConverterInputStream.init], line 6 (Error code: -1001)

on my macro as well as on the Loop Csv 2 Web Demo.

Thanks for your help!
mcmama96
Posts: 9
Joined: Wed Jul 30, 2014 6:44 pm

Re: not able to set correct datasource_line

Post by mcmama96 » Thu Jul 31, 2014 12:33 pm

Hi Chivracq,
Thank you. Let me rephrase my comment about running the loop demo. I ran it and it worked fine. Did a couple of things to mine, did not fix. Ran the demo, ok. Got a friend onto my computer to show him what they were doing. Now the demo does not work. I get this: RuntimeError: Invalid DATASOURCE_LINE value: 2, line: 11 which is the same set comment we are having trouble with: SET !DATASOURCE_LINE {{!LOOP}}
mcmama96
Posts: 9
Joined: Wed Jul 30, 2014 6:44 pm

Re: not able to set correct datasource_line

Post by mcmama96 » Thu Jul 31, 2014 1:01 pm

ok, I just found this info while digging for a possible solution.
"I encountered the same problem on previously working imacros macro files. I noticed that if I record a new macro it works fine. The difference between the old macro and the newly recorded one is that the new macro file is a UTF8 file prefixed with Byte Order Mark.
Augmenting @Thomas'answer: By only changing the macro file format from ANSI to UTF8 alone does not work -- the new file must also have a unicode Byte Order Mark (BOM) as well. For UTF8 it is the sequence 0xEF,0xBB,0xBF (see wikipedia entry for Byte Order Mark).
Be sure to use an editor that preserves the BOM. For PSPad, you might have to turn on an option in Program Settings/Program Part 2 to achieve that."

So I did an experiment. I deleted the Loop demo, then created it again and ran it immediately. It worked perfect. I put it in the bookmarks tab. Moved over to the files tab, then back to the bookmarks tab. Demo does not work. Deleted and reinstalled it again. worked fine.
Could this be part of the problem?
chivracq
Posts: 9251
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: not able to set correct datasource_line

Post by chivracq » Fri Aug 01, 2014 3:21 am

@ mcmama96: Yep the UTF-8 Char Encoding Save Trick has been known for a few months already, it actually came from a Change in Firefox..., I didn't (really) know that iMacros for CR was affected as well, maybe due to some Change the Developers included (from iMacros for FF) into iMacros v8.x for CR...
I cannot reproduce and was never impacted because I'm using Firefox (or actually Pale Moon, a Firefox forked Variant) and I already made all my Datasources a long time ago UTF-8 (with BOM) compatible and on Chrome, I'm still using iMacros v7.03 for CR (because using Commodo Dragon and not pure Chrome...).

But the part about moving a Macro from the Bookmarks to Files is new to me... We would need TechSupport to jump into the Thread to test that...

@ radis: Yep, oddly enough, but probably related to URF-8 Char Encoding as well, you need to resave your Datasource with Notepad in UTF-8 Encoding...
- (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...
mcmama96
Posts: 9
Joined: Wed Jul 30, 2014 6:44 pm

Re: not able to set correct datasource_line

Post by mcmama96 » Fri Aug 01, 2014 1:00 pm

Do we know if Imacros v7 has any problems on CR 36? That might be my solution? Just don't know how to get version 7 installed. :( I think I just answered my own question. :(

The part about moving from files to tab. What I meant was If I am working on the bookmarks tab and the macro works fine. If I then click on the files tab to try to run a different macro, then click back over to rerun the demo, it does not work?
chivracq
Posts: 9251
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: not able to set correct datasource_line

Post by chivracq » Fri Aug 01, 2014 2:47 pm

mcmama96 wrote:Do we know if Imacros v7 has any problems on CR 36? That might be my solution? Just don't know how to get version 7 installed. :( I think I just answered my own question. :(

The part about moving from files to tab. What I meant was If I am working on the bookmarks tab and the macro works fine. If I then click on the files tab to try to run a different macro, then click back over to rerun the demo, it does not work?
Yep, iMacros v7.x for CR will NOT work on CR35 and CR36 (not tested on CR36 though) because a Change in CR35 broke iMacros v7.x and I would be surprised if Chrome Development reverted in CR36 the Change they introduced in CR35...

You can test by yourself if you want, you need to download v7.03 from the iMacros for Chrome Version History Page and then using Windows Explorer, to drag&drop it onto the Chrome Extensions Page (in Developer's Mode). You will then get 2 independent Instances of iMacros in your Browser.
- (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...
mcmama96
Posts: 9
Joined: Wed Jul 30, 2014 6:44 pm

Re: not able to set correct datasource_line

Post by mcmama96 » Sun Aug 03, 2014 1:45 pm

first off...thanks chivracq for being patient and helping me to walk through all this. This is all new to me and you have been great.
I wanted to give you an update in hopes this might help you or someone else. Not even thinking of simple anymore, I figured this might be a big problem that would take a while. Not saying I found a fix...but maybe so far so good! A friend of mine suggested this so I tried it.
My issue was line 5 of my macro. He suggested to go into the macro and add a line, one line below the line giving me the issue. Then retyping exactly what the above line is. Then delete the old line and saving the macro.
IT WORKED SO FAR!!!! I did it yesterday. immediately ran a test of the macro and ran perfect. So I continued to run the macro for the work I needed. Closed IMacros last night. Came in this morning, opened to use the macro again and it worked!
I hope this is my fix and will post in a few days to let you know if there is any other issues.
chivracq
Posts: 9251
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: not able to set correct datasource_line

Post by chivracq » Sun Aug 03, 2014 9:42 pm

mcmama96 wrote:first off...thanks chivracq for being patient and helping me to walk through all this. This is all new to me and you have been great.
I wanted to give you an update in hopes this might help you or someone else. Not even thinking of simple anymore, I figured this might be a big problem that would take a while. Not saying I found a fix...but maybe so far so good! A friend of mine suggested this so I tried it.
My issue was line 5 of my macro. He suggested to go into the macro and add a line, one line below the line giving me the issue. Then retyping exactly what the above line is. Then delete the old line and saving the macro.
IT WORKED SO FAR!!!! I did it yesterday. immediately ran a test of the macro and ran perfect. So I continued to run the macro for the work I needed. Closed IMacros last night. Came in this morning, opened to use the macro again and it worked!
I hope this is my fix and will post in a few days to let you know if there is any other issues.
Okay..., good to hear..., but I think it's not retyping a Line in your Macro that did the Trick but saving it again, adding a mini-Comment would have done the same, and doing your "File/Bookmarks" Move will screw it again... Still related to URF-8 Encoding, I think...

But do post your Findings in a few days, I'm interested...
- (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...
mcmama96
Posts: 9
Joined: Wed Jul 30, 2014 6:44 pm

Re: not able to set correct datasource_line

Post by mcmama96 » Thu Aug 07, 2014 2:11 pm

I have not had any other issues with the macros running. Maybe IMacros secretly fixed it! :lol: :roll:
I am not sure how to explain the fix. I had redone the line previously, which did not correct the issue. Hopefully it will continue to work.
Post Reply