ansys / pydpf-core

Data Processing Framework - Python Core
http://dpf.docs.pyansys.com/
MIT License
68 stars 25 forks source link

Launching a remote session from macOS with PIM doesn't work #1272

Open jerome-blanche opened 11 months ago

jerome-blanche commented 11 months ago

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

Package Version
ansys-api-platform-instancemanagement 1.0.0
ansys-dpf-core 0.10.0
ansys-platform-instancemanagement 1.1.2
cachetools 5.3.2
certifi 2023.7.22
charset-normalizer 3.3.2
google-api-core 2.14.0
google-api-python-client 2.107.0
google-auth 2.23.4
google-auth-httplib2 0.1.1
googleapis-common-protos 1.61.0
grpcio 1.59.2
httplib2 0.22.0
idna 3.4
importlib-metadata 6.8.0
numpy 1.26.2
packaging 23.2
pip 21.2.4
protobuf 4.25.0
psutil 5.9.6
pyasn1 0.5.0
pyasn1-modules 0.3.0
pyparsing 3.1.1
requests 2.31.0
rsa 4.9
setuptools 58.0.4
tqdm 4.66.1
uritemplate 4.1.1
urllib3 2.1.0
zipp 3.17.0
jerome-blanche commented 11 months ago

duplicate of #1274