-
Hello, from ansys.mapdl.core import launch_mapdl and here is the error: C:\Program Files\ANSYS Inc\v222\ansys\bin\winx64\ansys222.exe During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): Process finished with exit code 1 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 27 replies
-
well... maybe your last reinstallation broke the env vars (check Try to launch MAPDL through the CLI. In your case something like: cd %temporary_directory_you_can_fill_with_garbage%
C:\Program Files\ANSYS Inc\v222\ansys\bin\winx64\ANSYS222.exe And see what you get. |
Beta Was this translation helpful? Give feedback.
-
Didn't it show any useful message? I'm surprised it worked using admin rights.... that's weird. Pinging @mikerife |
Beta Was this translation helpful? Give feedback.
-
Hi @ay8tb & @germa89 My gut tells me that when you installed the Ansys products you did not right-click the setup.exe and chose to run as an admin. MS User Account Control [UAC] can mess with installs even when using a admin account by limiting the admin account permissions during install. So please run the uninstall [C:\Program Files\ANSYS Inc\v222\Uninstall.exe] by right clicking Uninstall.exe and run that. Then redo the installation being sure to right-click setup.exe and run as admin. Next check the TEMP and TMP environment variables. They should be set to something reasonable like Then try to run PyMAPDL (using a new terminal so that it picks up any changed environment variable). Now what happens? Mike |
Beta Was this translation helpful? Give feedback.
-
Hi @ay8tb "C:/Program Files/ANSYS Inc/v222/ansys/bin/winx64/ANSYS222.exe -grpc" Don't forget the double quotes. MAPDL should start up in aaS mode and just show a dos terminal window that will look someting like this: If this starts up then note the Port number; 50052 is the default. If it does start up then open a new dos terminal and start Python. Then enter the two commands: from ansys.mapdl.core import Mapdl
mapdl = Mapdl()
If the port number is not 50052 then instead use
from ansys.mapdl.core import Mapdl
mapdl = Mapdl(port=nnnn) Where nnnn is the port number given in the MAPDL aaS start up window. If all this works you can then exit out of MAPDL by issueing the standard:
Then quit() out of Python. If not, then show us what went wrong (error message etc). Mike |
Beta Was this translation helpful? Give feedback.
Hi @ay8tb & @germa89
So first this is not a crash - a crash is an unexpected closing of the program. Trying to run MAPDL in a working directory that has a lock file will result in MAPDL shutting down and this is expected behavior.
My gut tells me that when you installed the Ansys products you did not right-click the setup.exe and chose to run as an admin. MS User Account Control [UAC] can mess with installs even when using a admin account by limiting the admin account permissions during install. So please run the uninstall [C:\Program Files\ANSYS Inc\v222\Uninstall.exe] by right clicking Uninstall.exe and run that. Then redo the installation being sure to right-click setup.exe and run as …