Calling the method dpf.start_local_server() raises a ModuleNotFoundError exception.
Traceback (most recent call last):
File "", line 1, in
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/core/server.py", line 249, in start_local_server
server = server_type(
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/core/server_types.py", line 888, in init
super().init(ansys_path=ansys_path, load_operators=load_operators)
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/core/server_types.py", line 625, in init
self._client_api_path = load_api.load_client_api(ansys_path=ansys_path)
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/gate/load_api.py", line 190, in load_client_api
path = _get_api_path_from_installer_or_package(ANSYS_PATH, ISPOSIX)
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/gate/load_api.py", line 109, in _get_api_path_from_installer_or_package
raise ModuleNotFoundError(
ModuleNotFoundError: To use ansys-dpf-gate as a client API install ansys-dpf-gatebin with :
pip install ansys-dpf-gatebin.
If the DPF_SERVER_TYPE environment variable is set to LEGACYGRPC before calling the start_local_server method, it works correctly.
Steps To Reproduce
The PIM server is up and running.
The ANSYS_PLATFORM_INSTANCEMANAGEMENT£_CONFIG environment variable is set to the PIM config file path, the content is valid.
In a Python console started from the virtual environment, enter the following lines:
import ansys.dpf.core as dpf
import os
"ANSYS_PLATFORM_INSTANCEMANAGEMENT_CONFIG" in os.environ
"DPF_SERVER_TYPE" in os.environ
dpf.start_local_server()
Inserting os.environ["DPF_SERVER_TYPE"] = "LEGACYGRPC"before the last line makes the thinks working.
Before submitting the issue
Description of the bug
Calling the method dpf.start_local_server() raises a ModuleNotFoundError exception.
Traceback (most recent call last): File "", line 1, in
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/core/server.py", line 249, in start_local_server
server = server_type(
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/core/server_types.py", line 888, in init
super().init(ansys_path=ansys_path, load_operators=load_operators)
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/core/server_types.py", line 625, in init
self._client_api_path = load_api.load_client_api(ansys_path=ansys_path)
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/gate/load_api.py", line 190, in load_client_api
path = _get_api_path_from_installer_or_package(ANSYS_PATH, ISPOSIX)
File "DPF/.venv/lib/python3.9/site-packages/ansys/dpf/gate/load_api.py", line 109, in _get_api_path_from_installer_or_package
raise ModuleNotFoundError(
ModuleNotFoundError: To use ansys-dpf-gate as a client API install ansys-dpf-gatebin with :
pip install ansys-dpf-gatebin.
If the DPF_SERVER_TYPE environment variable is set to LEGACYGRPC before calling the start_local_server method, it works correctly.
Steps To Reproduce
Inserting
os.environ["DPF_SERVER_TYPE"] = "LEGACYGRPC"
before the last line makes the thinks working.Which Operating System causes the issue?
MacOS
Which DPF/Ansys version are you using?
DPF Server 2023.2.pre1
Which Python version causes the issue?
3.9
Installed packages