Jump to content
We've recently updated our Privacy Statement, available here. ×

IronPython 2.0.2 is not supported, Application Profiler


Lucas Wood 2

Recommended Posts

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

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...