From 3fa4f5f6e274c5672c8beb820e15eccbac7a3ad0 Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:05:29 +0200 Subject: [PATCH 1/2] Fix Coordinate System example retro on Docker On Docker, older servers do not raise a KeyError but a DPFServerException. --- .../10-mesh_operations/13-nodes_in_local_coordinate_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py b/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py index 36778b0d8b3..eee05e8d2ea 100644 --- a/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py +++ b/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py @@ -59,7 +59,7 @@ # Starting with DPF 2025.1.pre1 cs = dpf.operators.result.coordinate_system() cs.inputs.data_sources.connect(model) -except KeyError: +except KeyError, ansys.dpf.gate.errors.DPFServerException: # For previous DPF versions cs = model.operator(r"mapdl::rst::CS") From 99d2192eb6c26e2e790e3437335b7c8ecd99fba6 Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:11:38 +0200 Subject: [PATCH 2/2] Update examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py --- .../10-mesh_operations/13-nodes_in_local_coordinate_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py b/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py index eee05e8d2ea..949317e897a 100644 --- a/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py +++ b/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py @@ -59,7 +59,7 @@ # Starting with DPF 2025.1.pre1 cs = dpf.operators.result.coordinate_system() cs.inputs.data_sources.connect(model) -except KeyError, ansys.dpf.gate.errors.DPFServerException: +except (KeyError, ansys.dpf.gate.errors.DPFServerException) as e: # For previous DPF versions cs = model.operator(r"mapdl::rst::CS")