View Full Version : Error message
tmason68
29-Mar-2011, 12:26 PM
Hi,
I am a complete newb. I am trying to resurrect an analytics project that got stalled last fall. Part of it uses BC to analyze changes in source files. I am currently getting this error:
Fatal Scripting Error: Unexpected argument(s) "layout:statistics"
But not on all of the scripts, just some. They all use that layout. Where to start in trying to figure this out?
Aaron
30-Mar-2011, 09:01 AM
Hello,
Is your script currently using the file-report command? file-report will attempt to generate the correct report type depending on the files selected (using a picture-report for jpg files, for example.) If the picked report type does not have a statistics layout, then it could throw that error.
You could change the script to use a specific report type (text-report).
If that is not the case, could you post or email your script? If you email us at support@scootersoftware.com, please include the link back to this forum post for reference.
tmason68
31-Mar-2011, 06:24 AM
Here is what this script looks like:
log verbose
load c:\pops\streamA\source\ c:\pops\streamB\source\
expand all
select all
filter "...\somecomponentfolder\"
file-report layout:statistics output-to:".\product\product_A_to_B_somecomponent.csv"
We have a bunch of similar scripts. The same handful seem to fail all the time but the majority run without error. The "somecomponentfolder" exists multiple times in the stream if that helps at all.
Aaron
31-Mar-2011, 09:19 AM
Hello,
If you are always expecting a Text Comparison Report, try using the text-report command instead of file-report.
If place your filter line above your load line to speed up your script.
Also, your output is as a .csv file, but a statistics report is not technically of a csv format with all the header information. If you are running into trouble with this, you'll want to output as .txt.
Lastly, is log verbose using the default intended? (default will create a Log.txt in current directory). Otherwise you can fully define a path, such as:
log verbose "c:\BCLogs\BCLog.txt"
filter "...\somecomponentfolder\"
load c:\pops\streamA\source\ c:\pops\streamB\source\
expand all
select all
text-report layout:statistics output-to:".\product\product_A_to_B_somecomponent.txt"
tmason68
31-Mar-2011, 11:05 AM
Hello,
If you are always expecting a Text Comparison Report, try using the text-report command instead of file-report.
If place your filter line above your load line to speed up your script.
Also, your output is as a .csv file, but a statistics report is not technically of a csv format with all the header information. If you are running into trouble with this, you'll want to output as .txt.
Lastly, is log verbose using the default intended? (default will create a Log.txt in current directory). Otherwise you can fully define a path, such as:
log verbose "c:\BCLogs\BCLog.txt"
filter "...\somecomponentfolder\"
load c:\pops\streamA\source\ c:\pops\streamB\source\
expand all
select all
text-report layout:statistics output-to:".\product\product_A_to_B_somecomponent.txt"
Changing to text-report and output type .txt worked. Thanks also for the speed tip on filtering. The log thing was something I threw in out of desperation, and I didn't read the directions.
Thanks!
Aaron
31-Mar-2011, 11:14 AM
No problem.
As I mentioned in the first post, a file-report command will trigger the appropriate report depending on the files selected, so for text files it will perform a text-report, for data files a data-report, for picture files a picture-report, etc.
Some report types do not have the statistics layout, which is probably why you were hitting the error. By forcing a text-report across the board, it ensures it can the statistics layout accessible.
vBulletin® v3.7.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.