ANSYS: Access denied error #2231
-
I just recently found pyaedt and wanted to give it a try with my install of Ansys Electronics Desktop 2022 R2. I managed to install pyaedt and started writing a test script in spyder to get an understanding of how to use the different functions in the pyaedt package. The script I wrote consists of just the import command and the Desktop() command to open up ANSYS, however when I run this script (either through spyder or command line) ANSYS starts to open but then immediately throws an error stating that access to the folder that my script is in is denied. I am the only user on my machine (windows workstation) and am the administrator. I'm not sure what to do/where to investigate this issue, so thought I'd post it here to see if anyone has any ideas or has encountered this before. I could not find anything regarding this on the pyaedt website, nor the ANSYS website. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Have you tried running one of the examples? Also, it's best to use a Python interpreter with user access. If you're using the system Python, you might try making a virtual environment and install dependencies there. |
Beta Was this translation helpful? Give feedback.
-
@rjwilliams84 the missing launch_desktop is probably due to the fact that you are using an older version of pyaedt. This method has been added recently in pyaedt so it would be nice to run
then the second error is most probably due to the fact that you run the script from Spyder folder and this folder is owned by spyder only with no access to other tools/ script.
|
Beta Was this translation helpful? Give feedback.
-
The issue was the way pyaedt was communicating with my install of hfss. Using grpc was the solution that worked for me, particularly adding in this line of code in the beginning of my python script: pyaedt.settings.use_grpc_api=True This allowed me to successfully run the HFSS_Dipole.py example. Thank you to Massimo at ANSYS for helping me work through this issue. If you are experiencing a similar issue to me, please try adding in the above line of code. |
Beta Was this translation helpful? Give feedback.
The issue was the way pyaedt was communicating with my install of hfss. Using grpc was the solution that worked for me, particularly adding in this line of code in the beginning of my python script:
pyaedt.settings.use_grpc_api=True
This allowed me to successfully run the HFSS_Dipole.py example. Thank you to Massimo at ANSYS for helping me work through this issue. If you are experiencing a similar issue to me, please try adding in the above line of code.