Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

ANSYS Workbench Unexpected Error Problem

    • din_hn
      Subscriber

      I have checked the forums and have not found a viable solution yet. One of the people has the same problem as me under this forum for 'ANSYS Products', but I couldn't understand how they solved it because it seems they are using Linux and I use Windows. Another person with the same problem as me in the forum for 'ANSYS Free Student Softwares' has their posts replied, but I couldn't access it because it denies me even opening the page. My last solution is to make a new post myself.

      So...I downloaded ANSYS Free Student Software to learn Workbench and Fluent. Fluent and the other applications work well, and I have no problems opening them except for Workbench alone. Whenever I open the workbench, the same unexpected error comes up no matter what I do.

      It loads all the plugins, initializes then instant error.

      "Unexpected error: The type initializer for 'Ansys.Core.Expressions.ExpressionEvaluator' threw an exception."

      The same error over and over again. How can I get my work done at this rate? Then, whenever I open the 'Show Details' button. This is what comes up.

      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)

      Solutions I tried:

      1. Reinstalled 5 times to be exact.
      2. Redownloaded the software from the website and then reinstalled it.
      3. Restarting my computer.
      4. Checking my environment paths, and they linked correctly.

      All the above solutions were done, and not a single one worked. I am annoyed. I want to contact support but cannot, and it directs me to this because I have the student software. Can someone help me?

    • George Karnos
      Ansys Employee

      If you Open windows file explorer and go to:
      %APPDATA%\
      You should see a directory named:   Ansys
      rename this to Ansys.old.
      now try to run.

      If that doesnt help:
      What is the output from opening a DOS cmd prompt and typing in the following and hitting enter:
      set



    • din_hn
      Subscriber

      I tried renaming the directory, which has the same problem mentioned above.

      As for the output from running 'set' in cmd, it gives the following prompt:

      IRONRUBY_11=C:\Program Files (x86)\IronRuby 1.1\bin
      LOCALAPPDATA=C:\Users\User\AppData\Local
      LOGONSERVER=\\User
      LSTC_LICENSE=Ansys
      NUMBER_OF_PROCESSORS=8
      OneDrive=C:\Users\User\OneDrive
      OS=Windows_NT
      Path=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\IronRuby 1.1\bin;C:\Program Files\dotnet\;C:\Users\Din_H\AppData\Local\Microsoft\WindowsApps;
      PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
      PROCESSOR_ARCHITECTURE=AMD64
      PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
      PROCESSOR_LEVEL=6
      PROCESSOR_REVISION=9e0a
      ProgramData=C:\ProgramData
      ProgramFiles=C:\Program Files
      ProgramFiles(x86)=C:\Program Files (x86)
      ProgramW6432=C:\Program Files
      PROMPT=$P$G
      PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
      PUBLIC=C:\Users\Public
      P_SCHEMA=C:\Program Files\ANSYS Inc\v222\AISOL\CADIntegration\Parasolid\PSchema
      SESSIONNAME=Console
      SoS_debug_exe=C:\Program Files\ANSYS Inc\v222\optiSLang\sos\sos_console.exe
      SoS_exe=C:\Program Files\ANSYS Inc\v222\optiSLang\sos\sos.exe
      SoS_install_dir=C:\Program Files\ANSYS Inc\v222\optiSLang\sos
      SW_SIM_HYDRA=C:\Program Files\Common Files\SolidWorks Shared\Simulation Worker Agent\
      SW_SIM_MPIT=INTELMPI
      SW_SIM_TEMP=C:\ProgramData\SOLIDWORKS\SW_net_sim_temp\
      SystemDrive=C:
      SystemRoot=C:\Windows
      TEMP=C:\Users\User\AppData\Local\Temp
      TMP=C:\Users\User\AppData\Local\Temp
      USERDOMAIN=User
      USERDOMAIN_ROAMINGPROFILE=User
      USERNAME=User
      USERPROFILE=C:\Users\User
      windir=C:\Windows

    • George Karnos
      Ansys Employee

      It could be that IronRuby is interferring.

      I would try editing your system PATH to make sure that it starts with c:\Windows\system32

      Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\IronRuby 1.1\bin;C:\Program Files\dotnet\;C:\Users\Din_H\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;....etc

      Also, if IronRuby is not needed, you can try uninstalling it.

    • din_hn
      Subscriber

      After carefully following your suggestions, I edited the path similar to what you have shown, and the error persisted. But after IronRuby was uninstalled, only then did the workbench work properly.

      Thank you. It finally works after days of trying.

Viewing 4 reply threads
  • The topic ‘ANSYS Workbench Unexpected Error Problem’ is closed to new replies.