Ansys Free Student Software

Ansys Free Student Software

Topics cover installation and configuration of our free student products

Unexpected error when trying to open workbench

    • stja
      Subscriber

      I downloaded the student version of Ansys and when I try to open workbench I get a windown that says "Unexpected error: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception. I tried uninstalling and then reinstalling that didn't work. I tried Updating my drivers that didnt work. I tried power cycling my computer it didnt fix it either. I saw someone in another question was talking about uninstalling some python thing but they never said how and Im also not sure if thats the problem.

      Here's the Details from the Error message:

      An unexpected error has occurred: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception.

      System.MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable`1 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 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.Core.Expressions.ExpressionEvaluator.CreateScriptEngine()

        at Ansys.Core.Expressions.ExpressionEvaluator..cctor()

      --- System.TypeInitializationException: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception.

        at Ansys.Core.Expressions.ExpressionEvaluator..ctor()

        at Ansys.Core.Expressions.ExpressionManager..ctor()

        at Ansys.ParameterManager.Data.ParameterEvaluator..ctor(ParameterContainer container)

        at Ansys.ParameterManager.Data.ParameterContainer..ctor()

        at Ansys.ParameterManager.Commands.CreateStaticParameterContainerCommand.Execute(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: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception.

      CommandName: Parameters.CreateStaticParameterContainer()

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

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

        at Ansys.Core.DataModel.ProjectSystem.Project.InvokeProjectInitializationCommands(IProtectedContext commandContext)

        at Ansys.Core.DataModel.ProjectSystem.ResetCommand.Execute(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: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception.

      CommandName: Reset()

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

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

        at Ansys.Core.DataModel.ProjectSystem.ResetCommand.InvokeAndWait(IProtectedContext context)

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


      Thanks

    • stja
      Subscriber
      Through more research I found that by uninstalling a program called IronRuby Console Workbench was able to open as its supposed to. I have no Idea why this works or what this means but it worked
    • Vinícius Silva
      Subscriber

      Thank you so much!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.