Lucas Wood 2 Posted January 31, 2019 Share Posted January 31, 2019 I'm writing an Application Profiler script to detect jQuery in scripts on the library in preparation for Spotfire X, where it is my understanding that everything will break. Here is my "per Analysis" script: from Spotfire.Dxp.Application.Scripting import * for sc in Document.ScriptManager.GetScripts(): result = "Clean" if sc.ScriptCode.find("$(")>-1: result = "Suspected jQuery" OutputColumns["jQueryFinder"] = OutputColumns["jQueryFinder"] + "nScript:" + sc.Name + ":" + result Here is my output columns script: from sys import * from Spotfire.Dxp.Data import DataType OutputColumnDataTypes.Add(Tuple.Create[string,DataType]("jQueryFinder", DataType.String)) Seems like it bugs out on me! Here is the error from the results: System.Exception: Failed to execute script to get Document OutputColumnDataTypes: C:UsersLucasWoodDesktopfindjQuery-Output.py ---> System.NotSupportedException: The script language 'IronPython 2.0.2', is not supported. at Spotfire.Dxp.Application.Scripting.ScriptService.ExecuteForDebugging(String scriptCode, ScriptLanguage scriptLanguage, Dictionary`2 scope, Stream outputStream) at Spotfire.Dxp.Application.Scripting.ScriptManager.c__DisplayClass12_0.b__0() at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(Executor executor, Boolean visible, Boolean sticky, Guid stickyGuid) at Spotfire.Dxp.Framework.Commands.CommandHistory.Transaction(String displayName, Executor executor) at Spotfire.Dxp.Application.Scripting.ScriptManager.ExecuteScript(String scriptCode, ScriptLanguage scriptLanguage, IDictionary`2 scriptArguments, Stream outputStream, Boolean executeInTransaction) at Spotfire.Dxp.ApplicationProfiler.ApplicationProfilerTestRunner.RunOutputColumnsScript(String scriptType, String originalPath, String tempPath) --- End of inner exception stack trace --- at Spotfire.Dxp.ApplicationProfiler.ApplicationProfilerTestRunner.RunOutputColumnsScript(String scriptType, String originalPath, String tempPath) at Spotfire.Dxp.ApplicationProfiler.ApplicationProfilerTestRunner.RunTest() Ideas Link to comment Share on other sites More sharing options...
Lucas Wood 2 Posted January 31, 2019 Author Share Posted January 31, 2019 please excuse the missing indentions in the python Link to comment Share on other sites More sharing options...
Sayali Patil Posted February 12, 2019 Share Posted February 12, 2019 Hello, What version of Spotfire are you running this on I tried running this script on version 7.14 and do not get this error. Thx! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now