Error when launching EDB #1153
Replies: 25 comments
-
Beta Was this translation helpful? Give feedback.
-
@loganchoi, i opened a new issue to track your second question. |
Beta Was this translation helpful? Give feedback.
-
@ring630, |
Beta Was this translation helpful? Give feedback.
-
@loganchoi, I cannot reproduce your problem. Does your machine have access to licenser server? |
Beta Was this translation helpful? Give feedback.
-
@ring630 The ANSYS SIWave versions I utilize are 2022 R1 and 2023 R1 and I have already added the licenses to all the ANSYS products to my environment variables. |
Beta Was this translation helpful? Give feedback.
-
@loganchoi by the error log, it looks like a .NET framwork related issue. One possible reason is your Python environment is corrupted. Can you create a new virtual environment and install the latest PyAEDT? and give it a try. |
Beta Was this translation helpful? Give feedback.
-
Maybe the default directory does not have write permissions? |
Beta Was this translation helpful? Give feedback.
-
It could be related to the compatibility between the DLL and the python environment.
We might update this list if we ensure that the tests are working fine. |
Beta Was this translation helpful? Give feedback.
-
@Samuelopez-ansys I specified a different directory where I have permissions and it doesn't throw the corrupted memory error anymore. However, it says I failed to initialize DLLs and that I have a list index out of range error. @SMoraisAnsys I will try that next and let you know what happened. @ring630 I have the correct pyaedt version of 7.4 and reinstalled it as well. |
Beta Was this translation helpful? Give feedback.
-
@SMoraisAnsys I changed my python version to be 3.10 and I still get the same errors. |
Beta Was this translation helpful? Give feedback.
-
@loganchoi It fails to import the EDB dll. Seems you are on Windows ? |
Beta Was this translation helpful? Give feedback.
-
@svandenb-dev I have the ANSYS tool licenses in my path in the environment variables. Do I need to add something else for me to access it via user terminal? |
Beta Was this translation helpful? Give feedback.
-
@loganchoi No I think it should be ok. Can you confirm you can start Desktop like HFSS from PyAEDT ? If yes you may have some conflicts in your libraries which prevent loading the EDB dll. It's not easy to figure out without more information. |
Beta Was this translation helpful? Give feedback.
-
Hi @loganchoi , Please try:
If after all these steps, it is still not working, please send an email: [email protected] |
Beta Was this translation helpful? Give feedback.
-
@svandenb-dev Yeah, I can start a desktop application and start an HFSS project by using PyAEDT. @Samuelopez-ansys I created a new virtual environment and AEDT 2023R1 can open correctly, but can't run an Edb() command. |
Beta Was this translation helpful? Give feedback.
-
@Samuelopez-ansys I sent an email to [email protected] and I got an automatic email saying that the email will not be monitored anymore and that the best support is to utilize this github or on discussion forums on ansys.com. |
Beta Was this translation helpful? Give feedback.
-
@loganchoi Thanks for your feeback. From your previous input and answers, I have the feeling that the LOC responsible for your issue is import pyaedt
targetfile = pyaedt.downloads.download_file('edb/ANSYS-HSD_V1.aedb')
edb = pyaedt.Edb(edbpath=targetfile) If this lines of code work on your side then the reason for the failure is probably related to the AEDB file that you provide. We expect it to have some cells and are unable to get one during |
Beta Was this translation helpful? Give feedback.
-
@SMoraisAnsys I've gotten a similar error of PyAEDT failing to initialize DLLs. |
Beta Was this translation helpful? Give feedback.
-
@loganchoi With what kind of python interpreter did you created your virtual environment ? Did you created your virtual environment (the python base was installed from scratch ? microsoft installation ? something else ? Could you try to create a new python environment with the CPython embedded with AEDT ? The path should be something like From PowerShell, the full command to create the virtual environment would be |
Beta Was this translation helpful? Give feedback.
-
@Samuelopez-ansys I utilized the python based to create the virtual environment. with the command python3.10 -m venv environment I followed your instructions and still get the DLLs error. |
Beta Was this translation helpful? Give feedback.
-
@loganchoi Could you check your virtual environments? If you have anyone related to Ansys, or pointing to any other AEDT version, please remove it. In addition, can you install any other AEDT version (2023R2 for instance)? Maybe your AEDT version is corrupted because it is my first time seeing this issue. |
Beta Was this translation helpful? Give feedback.
-
Am I right to assume that this message was addressed to me ? If you still have the same error while using the python interpreter included in AEDT common files, I would suggestion to follow Samuel's comment. There might be an issue with your AEDT installation. |
Beta Was this translation helpful? Give feedback.
-
Hi, not sure what the status of this issue is, but I'm seeing a related error to the one described by the OP when attempting to use EDB via pyAEDT or pyAEDB on Windows 11. I saw this error (copied below) when using 2022.R2, and followed all the suggestions above, including creating a fresh python environment, reinstalling Ansys. I also tried uninstalling 2022.R2 and upgrading to 2023.R2, but I see the same error. To reproduce: import pyaedt
edb = pyaedt.Edb() # I've ensured I have all permissions for the default directory, and I've tried specifying other directories Python version: 3.11.8 Error:
The same thing happens when I try doing this through I also tried @SMoraisAnsys 's suggestion of running the following code: import pyaedt
targetfile = pyaedt.downloads.download_file('edb/ANSYS-HSD_V1.aedb')
edb = pyaedt.Edb(edbpath=targetfile) which gives the same error as reported by @loganchoi :
Any suggestions would be appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi @shash-sharma, |
Beta Was this translation helpful? Give feedback.
-
I can't upgrade to 2024 yet due to compatibility concerns, but I found that using Python 3.10 rather than 3.11 seems to fix this. Alternatively, using the python executable inside the Ansys folder per @SMoraisAnsys 's comment above fixes this - which is how I realized that the python version might be the issue. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @ring630,
I'm looking deeper into PyAEDT, and I am getting an error where if I just start an EDB class, it says I am trying to access memory that could be corrupted or is protected and will crash the program. I have attached the image for your reference. I correctly installed pyaedt and have a functional ANSYS tool for SIwave and Electronics Desktop. Is there a reason why I am getting this error, and/or did I forget to potentially install something or set a path?
Originally posted by @loganchoi in ansys/pyaedt#4156 (reply in thread)
Beta Was this translation helpful? Give feedback.
All reactions