Macro can't find datasource

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
azbob
Posts: 76
Joined: Mon Sep 21, 2009 6:16 pm

Macro can't find datasource

Post by azbob » Mon Sep 21, 2009 6:41 pm

Hi,
I have added a new line(line 8) to the datasource of a tested macro. This line will fill in "subject" info if it has been entered and if not entered then falls through to error at which time I just ignore.(See attached code for "line 8" at end.) I added it to the end since the macro fills in the form with with the preceding 7 lines of data and if there is no subject data and since majority of form is filled in I can just stop macro at that time.
Problem is that when it runs and gets to line 8 it gives me an error that it can't find datasource(attached csv file).
sometimes it hangs and gives a run time "55".
I have tried putting this code at beginning with ignorerror yes but it still responds "can't find datasource...
I am at a loss as to why when I added line 8 macro now doesn't work.

Thanks
Hannes, Tech Support

Re: Macro can't find datasource

Post by Hannes, Tech Support » Tue Sep 22, 2009 7:47 am

Seems like you did not post the code you refer to.
azbob
Posts: 76
Joined: Mon Sep 21, 2009 6:16 pm

Re: Macro can't find datasource

Post by azbob » Tue Sep 22, 2009 8:55 pm

Hannes, iOpus wrote:Seems like you did not post the code you refer to.
It is in .pdf format and forum won't let me attach with that file type.
What file types are acceptable?
genebadd
Posts: 3
Joined: Mon Sep 21, 2009 10:10 pm

Re: Macro can't find datasource

Post by genebadd » Wed Sep 23, 2009 2:02 am

why not just post a snippet of the code using the code button?

Code: Select all

CODE GOES HERE
azbob
Posts: 76
Joined: Mon Sep 21, 2009 6:16 pm

Re: Macro can't find datasource

Post by azbob » Wed Sep 23, 2009 3:44 am

Code: Select all

VERSION BUILD=6221002 TAB T=0 
TAB CLOSEALLOTHERS 
SET !DATASOURCE input.csv 
SET !DATASOURCE_COLUMNS 30 FRAME F=5...
********FIRST LINE OF FORM**********
SET !DATASOURCE_LINE 2 'AGE in years into !VAR1 
SET !VAR1 -{{!COL24}} 
ADD !VAR1 {{!NOW:yyyy}} 
'SET TOTALS ROOMS TO BEDS PLUS THREE 
SET !VAR2 {{!COL14}}
ADD !VAR2 3 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesAddress_1 CONTENT={{!COL2}}<SP>{{!COL23}}<SP>{{!COL3}}<SP>{{!COL13}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesCity_1 CONTENT={{!COL4}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesSqFt_1 CONTENT={{!COL17}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesBR_1 CONTENT={{!COL14}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesBA_1 CONTENT={{!COL15}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesTR_1 CONTENT={{!VAR2}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesType_1 CONTENT=SF<SP>Detach 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesStyle_1 CONTENT=Contemp
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesLoc_1 CONTENT=Good 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesYrBlt_1 CONTENT={{!COL24}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesLotSize_1 CONTENT={{!COL22}}<SP>sf
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesGar_1 CONTENT=2<SP>Attached 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesExt_1 CONTENT=N/A 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesLand_1 CONTENT=Good 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesFin_1 CONTENT={{!COL2}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesCond_1 CONTENT=Good 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesComm_1 CONTENT=
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesOLPrice_1 CONTENT={{!COL8}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesDOM_1 CONTENT={{!COL12}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesSPrice_1 CONTENT={{!COL7}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesSDate_1 CONTENT={{!COL6}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesSLPrice_1 CONTENT={{!COL9}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sCSalesSource_1 CONTENT=MLS 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:CSalesSourceID_1 CONTENT={{!COL1}} 

CODE CONTINUES LIKE THIS FOR SEVEN LINES THEN..... 

' '**************************SUBJECT************************************ ' 
SET !DATASOURCE_LINE 8
 'AGE in years into !VAR1 
SET !VAR1 -{{!COL24}} 
ADD !VAR1 {{!NOW:yyyy}} 
'SET TOTALS ROOMS TO BEDS PLUS THREE 
SET !VAR2 {{!COL14}} 
ADD !VAR2 3 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:PropSqFt CONTENT={{!COL17}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:LotSize CONTENT={{!COL22}}<SP>sf 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sPropBR CONTENT={{!COL14}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sPropBA CONTENT={{!COL15}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:sPropTR CONTENT={{!VAR2}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:BPOForm ATTR=NAME:PropYrBlt CONTENT={{!COL24}}
 '
Last edited by Anonymous on Wed Sep 23, 2009 7:29 am, edited 1 time in total.
Reason: Admin: adjusted [code] tags
Hannes, Tech Support

Re: Macro can't find datasource

Post by Hannes, Tech Support » Wed Sep 23, 2009 7:36 am

Setting !DATASOURCE_LINE twice in a macro is perfectly fine.
How does your datasource file look like?
azbob
Posts: 76
Joined: Mon Sep 21, 2009 6:16 pm

Re: Macro can't find datasource

Post by azbob » Thu Sep 24, 2009 3:56 am

Here is datasource.

Code: Select all

Listing Number	House Number	Street Name	City/Town Code	Zip Code	Close of Escrow Date	Sold Price	Original List Price	List Price	List Date	Agent Days On Market	Cumulative DOM	St Suffix	# Bedrooms	# Bathrooms	State/Province	Approx SQFT	Approx SqFt Range	Source of SqFt	2 Car Garage	2 Car Carport	Lot Size	Compass	Year Built	Pool	Assessor Parcel Ltr	Contingent	Listing Office	Listing Member	Auction
4192675	4038	CIELO GRANDE	Glendale	85310	8/27/2009	219900	249000	219900	6/16/2009	39	41	--	4	3	AZ	2723	2,501 - 2,750	T			6030	W	1988	None			DPR Realty, LLC (dvpt01)	Lisa Hinkson	No
4198695	3928	QUAIL	Glendale	85308	7/29/2009	210000	250000	250000	5/29/2009	27	363	AVE	5	3	AZ	2635	2,501 - 2,750	T			8461	W	2004	Private			Dave Froehlich Realty (froe01)	Dave Froehlich	No
4113767	3132	ZACHARY	Phoenix	85027	6/22/2009	195000	215000	195000	1/29/2009	99	108	DR	4	2.5	AZ	2440	2,251 - 2,500	T	Yes		6489	W	1998	None			West USA Realty (wusa02)	Dee Psarros	No
4178064	2251	SPUR	Phoenix	85085			240000	230000	5/22/2009	122	122	DR	4	3	AZ	3128	3,001 - 3,500	T	Yes		7169	W	2007	None		N	John Hall & Associates (halj05)	John Caprar	No
4222939	21642	30 TH	Phoenix	85027			215000	215000	7/28/2009	55	55	LN	4	2.5	AZ	2440	2,251 - 2,500	T			7068	N	1997	Private			Perfect Choice Real Estate (prfc01)	Blanca Araiza	No
4198041	3816	FALLEN LEAF	Glendale	85310			194900	194900	6/26/2009	87	12	LN	5	2.5	AZ	2593	2,501 - 2,750	T	Yes		5057	W	1997	Private			RE/MAX Fine Properties (rmfp03)	Don Matheson	No
1866359	3148	ROSE GARDEN	Phoenix	85027			188000	188000	9/2/2002	89	89	LN	4	2.5	AZ	2672	2,501 - 2,750	T	Yes		7192	W	1999	None		N	West USA Realty (wusa04)	Teresa Anderson	
Hannes, Tech Support

Re: Macro can't find datasource

Post by Hannes, Tech Support » Thu Sep 24, 2009 8:49 am

Hmm.
There are two things that are suspicious:
1) the CSV actually is not comma separated (but separated by tabs)
2) line 8 is one field shorter than the others

If adjusting these does not solve the issue, perhaps you can build a macro (that uses your input file) that works on a site we can access, like http://www.iopus.com/imacros/demo/v6/f1/form.asp where we can recreate the issue.
azbob
Posts: 76
Joined: Mon Sep 21, 2009 6:16 pm

Re: Macro can't find datasource

Post by azbob » Thu Sep 24, 2009 7:55 pm

I apologize I copied the excel format ..Here is actual file that is input.csv

Code: Select all

Listing Number,House Number,Street Name,City/Town Code,Zip Code,Close of Escrow Date,Sold Price,Original List Price,List Price,List Date,Agent Days On Market,Cumulative DOM,St Suffix,# Bedrooms,# Bathrooms,State/Province,Approx SQFT,Approx SqFt Range,Source of SqFt,2 Car Garage,2 Car Carport,Lot Size,Compass,Year Built,Pool,Assessor Parcel Ltr,Contingent,Listing Office,Listing Member,Auction4192675,4038,CIELO GRANDE,Glendale,85310,8/27/2009,219900,249000,219900,6/16/2009,39,41,--,4,3,AZ,2723,"2,501 - 2,750",T,,,6030,W,1988,None,,,"DPR Realty, LLC (dvpt01)",Lisa Hinkson,No4198695,3928,QUAIL,Glendale,85308,7/29/2009,210000,250000,250000,5/29/2009,27,363,AVE,5,3,AZ,2635,"2,501 - 2,750",T,,,8461,W,2004,Private,,,Dave Froehlich Realty (froe01),Dave Froehlich,No4113767,3132,ZACHARY,Phoenix,85027,6/22/2009,195000,215000,195000,1/29/2009,99,108,DR,4,2.5,AZ,2440,"2,251 - 2,500",T,Yes,,6489,W,1998,None,,,West USA Realty (wusa02),Dee Psarros,No4178064,2251,SPUR,Phoenix,85085,,,240000,230000,5/22/2009,122,122,DR,4,3,AZ,3128,"3,001 - 3,500",T,Yes,,7169,W,2007,None,,N,John Hall & Associates (halj05),John Caprar,No4222939,21642,30 TH,Phoenix,85027,,,215000,215000,7/28/2009,55,55,LN,4,2.5,AZ,2440,"2,251 - 2,500",T,,,7068,N,1997,Private,,,Perfect Choice Real Estate (prfc01),Blanca Araiza,No4198041,3816,FALLEN LEAF,Glendale,85310,,,194900,194900,6/26/2009,87,12,LN,5,2.5,AZ,2593,"2,501 - 2,750",T,Yes,,5057,W,1997,Private,,,RE/MAX Fine Properties (rmfp03),Don Matheson,No1866359,3148,ROSE GARDEN,Phoenix,85027,,,188000,188000,9/2/2002,89,89,LN,4,2.5,AZ,2672,"2,501 - 2,750",T,Yes,,7192,W,1999,None,,N,West USA Realty (wusa04),Teresa Anderson,
azbob
Posts: 76
Joined: Mon Sep 21, 2009 6:16 pm

Re: Macro can't find datasource

Post by azbob » Thu Sep 24, 2009 10:42 pm

Adding missing field at end solved issue.
Thanks for help
Post Reply