ansys / pymechanical

Pythonic interface to Ansys Mechanical
https://mechanical.docs.pyansys.com/
MIT License
29 stars 13 forks source link

Bug: app = App() raises exception #780

Open dipinknair opened 1 week ago

dipinknair commented 1 week ago

system : windows virtual machine Mechanical version - 24R1

Discussed in https://github.com/ansys/pymechanical/discussions/756

Originally posted by **vgelbgras** June 4, 2024 Hi guys, I am trying to use pymechanical on a virtual machine (the objective is to use the VM as runner for GH workflow running e2e tests). When I try to get the App(), it raises an error. Would you have some guidelines to debug this? ![image](https://github.com/ansys/pymechanical/assets/78641481/32c112b9-1cf0-4583-a2a4-915d4fce755c) ``` >>> from ansys.mechanical.core import App >>> app = App() CRITICAL - - logging - handle_exception - Uncaught exception Traceback (most recent call last): File "", line 1, in File "C:\ansysdev\github-action-runner-2\_work\_tool\Python\3.10.11\x64\lib\site-packages\ansys\mechanical\core\embedding\app.py", line 137, in __init__ self._app = _start_application(configuration, self._version, db_file) File "C:\ansysdev\github-action-runner-2\_work\_tool\Python\3.10.11\x64\lib\site-packages\ansys\mechanical\core\embedding\app.py", line 74, in _start_application return Ansys.Mechanical.Embedding.Application(db_file, addin_configuration_name) System.NullReferenceException: Object reference not set to an instance of an object. at Ansys.Mechanical.Scripting.ACTScriptEngine.GetScope(String scopeName) at Ansys.Mechanical.Scripting.ACTScriptEngine.CreateScope(String scopeName, Boolean isEmpty, Nullable`1 debugMode) at Ansys.ACT.Mechanical.Application.MechanicalApplicationAPI.ExecuteCommandWithScope(String scopeName, String cmd, Dictionary`2 args, Dictionary`2 rets) at Ansys.ACT.Mechanical.Application.MechanicalApplicationAPI.ExecuteCommand(String cmd, Dictionary`2 args, Dictionary`2 rets) at Ansys.ACT.Core.ExtensionAPI.ExecuteCommand(String cmd, Dictionary`2 args, String vars) at Ansys.Mechanical.Embedding.Application.startApp(String dbFile, String configuration) ```