You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on the on application, its observed that pydyna pre doesnt launch since it considers the python defined in the system defaults.
I observe the following error
Traceback (most recent call last):
File "C:\Users\agvarghe\AppData\Roaming\PYDYNA\ansys-pydyna-pre-server\kwserver.py", line 7, in
import grpc
ModuleNotFoundError: No module named 'grpc'
This happens when launching a script using "/path/to/venv/Scripts/python script.py" which in turn launches this script using subprocess. If you activate the venv and then run the script it works fine. However, it is expected to work in both cases, so changing hard-coded "python" in scripts to using sys.executable would be preferred if the expected outcome is to use the same python for both cases.
Hi @agvarghe, Thank you for your information, it is very helpful, now I am trying to update pydyna according to your three suggestions(issue 559,432,564), I will keep you updated on any progress.
🔍 Before submitting the issue
🐞 Description of the bug
While working on the on application, its observed that pydyna pre doesnt launch since it considers the python defined in the system defaults.
I observe the following error
Traceback (most recent call last):
File "C:\Users\agvarghe\AppData\Roaming\PYDYNA\ansys-pydyna-pre-server\kwserver.py", line 7, in
import grpc
ModuleNotFoundError: No module named 'grpc'
The reason is observed to be due to line
https://github.com/ansys/pydyna/blob/6c05ae71c45e74f733cffa3c559efefdfebe813e/src/ansys/dyna/core/pre/launcher.py#L139C22-L139C60
here , it would be nice if we replace with
subprocess.Popen(f"{sys.executable} kwserver.py", cwd=server_path, shell=True,)
📝 Steps to reproduce
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2024R2
🐍 Which Python version are you using?
3.10
📦 Installed packages
aiofiles==23.2.1
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiomysql==0.2.0
aioshutil==1.5
aiosignal==1.3.1
aiosqlite==0.19.0
alabaster==0.7.16
altgraph==0.17.4
annotated-types==0.7.0
ansys-api-dbu==0.3.0
ansys-api-dyna==0.3.6
ansys-api-geometry==0.4.1
ansys-api-meshing-prime==0.1.2
ansys-api-platform-instancemanagement==1.1.0
ansys-bdm-api==0.1.dev15
ansys-bdm-shared-volume==0.1.dev11
ansys-dpf-core==0.12.1
ansys-dyna-core==0.4.15
The text was updated successfully, but these errors were encountered: