Skip to content

Commit c856297

Browse files
authored
Fix version of latest Ansys unified install available in grpc compatibility error message (#376)
* Lastest Ansys unified install is 2022R2 and not 2022R1. * Automatic latest_ansys in message * Remove anything hardcoded and use core._version.server_to_ansys_version instead.
1 parent 9e65d3a commit c856297

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ansys/dpf/core/server_types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,14 @@ def check_ansys_grpc_dpf_version(server, timeout):
272272
ansys_version_to_use = server_to_ansys_version.get(server_version, 'Unknown')
273273
compatibility_link = (f"https://dpfdocs.pyansys.com/getting_started/"
274274
f"index.html#client-server-compatibility")
275+
ansys_versions = core._version.server_to_ansys_version
276+
latest_ansys = ansys_versions[max(ansys_versions.keys())]
275277
raise ImportWarning(f"An incompatibility has been detected between the DPF server version "
276278
f"({server_version} "
277279
f"from Ansys {ansys_version_to_use})"
278280
f" and the ansys-grpc-dpf version installed ({grpc_module_version})."
279281
f" Please consider using the latest DPF server available in the "
280-
f"2022R1 Ansys unified install.\n"
282+
f"{latest_ansys} Ansys unified install.\n"
281283
f"To follow the compatibility guidelines given in "
282284
f"{compatibility_link} while still using DPF server {server_version}, "
283285
f"please install version {right_grpc_module_version} of ansys-grpc-dpf"

0 commit comments

Comments
 (0)