Workbench unexpected error

Workbench gives an error every time it opens. The Workbench gives an "unexpected error" Exception has been thrown by the target or an invocation" every time you try to open it. I have verified Iron Pyton and the other pre-req software is installed. I tried this with the 2020 R1 and R2 release and on multiple computers. I get the same issue. Can you anyone help?

Tagged:

Best Answer

Answers

  • tsiriakstsiriaks 3240 El Camino Real #290, Irvine, CA 92602Forum Coordinator

    can you provide a screenshot of the error message ? Make sure you expand the 'more details' if exist. Please post the image inline with text (don't attach it)

    have you tried temporarily disabling the security (anti-virus, firewall, etc.) on the machine ?

  • Here is the error. Yes, I tried disabling security and tried it on multiple PCS:

    An unexpected error has occurred: Exception has been thrown by the target of an invocation.

    System.MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable`1<!!0> Microsoft.Scripting.Utils.ReflectionUtils.GetCustomAttributes(System.Reflection.Assembly, Boolean)'.

      at IronPython.Runtime.Binding.PythonBinder.DomainManager_AssemblyLoaded(Object sender, AssemblyLoadedEventArgs e)

      at IronPython.Runtime.Binding.PythonBinder..ctor(PythonContext pythonContext, CodeContext context)

      at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options)

    --- System.Reflection.TargetInvocationException: Failed to load language 'IronPython 2.7.4': Method not found: 'System.Collections.Generic.IEnumerable`1<!!0> Microsoft.Scripting.Utils.ReflectionUtils.GetCustomAttributes(System.Reflection.Assembly, Boolean)'.

      at Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean& alreadyLoaded)

      at Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config)

      at Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName providerName, LanguageContext& language)

      at Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName)

      at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName)

      at Ansys.PythonScriptingEngine.PythonScriptingEngine.CreateIronPythonEngine()

      at Ansys.PythonScriptingEngine.PythonScriptingEngine.Initialize(CommandManager commandManager)

    --- System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

      at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

      at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

      at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)

      at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)

      at System.Activator.CreateInstance(Type type, Object[] args)

      at Ansys.Core.Scripting.ScriptingEngineFactory.createEngine(Boolean debug)

      at Ansys.Core.Scripting.ScriptingEngineFactory.GetScriptingEngine()

      at Ansys.EKM.Commands.InitWorkbenchServerCommand.RunWorkbenchServerUtilsScript(IFullContext context)

      at Ansys.Core.Commands.Concurrency.CommandWorkUnit.executeInContext(CommandContext subContext, IExecutionEngineCallback tracer)

      at Ansys.Core.Commands.Concurrency.BaseWorkUnit.doExecute(IExecutionEngineCallback executionEngine, CommandContext subContext)

      at Ansys.Core.Commands.Concurrency.BaseWorkUnit.Execute(IExecutionEngineCallback executionEngine, Boolean dontCatchExceptions)

    --- Ansys.Core.Commands.CommandFailedException: Exception has been thrown by the target of an invocation.

    CommandName: EKM.RunServerScript()

      at Ansys.Core.Commands.CommandAsyncResult.RethrowFailureException(Exception e)

      at Ansys.Core.Commands.CommandAsyncResult.Wait(Int32 milliSecondsTimeout, Boolean exitContext)

      at Ansys.Core.Commands.CommandManager.InvokeSessionInitializationCommands()

      at Ansys.Core.Kernel.RegisterSessionData()

      at Ans.Program.Runtime.Initialize(RuntimeSettings settings)

  • IronRuby was it! That was installed with Automation Studio. I removed IronRuby and all is well. Thank you so much for the help!

  • tsiriakstsiriaks 3240 El Camino Real #290, Irvine, CA 92602Forum Coordinator

    Nice ! Glad that helps you figure out the issue.

  • I'm also facing this ironPython kind of error

    Plz help

Sign In or Register to comment.