From e5c857922e5a1ce26f959d405dc5eee9134faf32 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:19:43 +0000 Subject: [PATCH 1/6] Initial plan From 421f54be7d18c2cff61c9f958d34e36cf485e274 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:20:37 +0000 Subject: [PATCH 2/6] Fix BaseTask.get_id to raise RuntimeError when task ID not found Agent-Logs-Url: https://github.com/ansys/pyfluent/sessions/7757a4b3-49ee-4d7e-9df4-6f8b2f8d9ac6 Co-authored-by: Gobot1234 <50501825+Gobot1234@users.noreply.github.com> --- src/ansys/fluent/core/workflow.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ansys/fluent/core/workflow.py b/src/ansys/fluent/core/workflow.py index 98a5d09050f..d05debce27b 100644 --- a/src/ansys/fluent/core/workflow.py +++ b/src/ansys/fluent/core/workflow.py @@ -340,6 +340,7 @@ def get_id(self) -> str: type_, id_ = k.split(":") if type_ == "TaskObject": return id_ + raise RuntimeError("Task ID not found, should be unreachable") def get_idx(self) -> int: """Get the unique integer index of this task, as it is in the application. From c73fca2f9f53327ad758764abee70849d1e05c52 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:22:06 +0000 Subject: [PATCH 3/6] Improve RuntimeError message in BaseTask.get_id Agent-Logs-Url: https://github.com/ansys/pyfluent/sessions/7757a4b3-49ee-4d7e-9df4-6f8b2f8d9ac6 Co-authored-by: Gobot1234 <50501825+Gobot1234@users.noreply.github.com> --- src/ansys/fluent/core/workflow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ansys/fluent/core/workflow.py b/src/ansys/fluent/core/workflow.py index d05debce27b..388955aa397 100644 --- a/src/ansys/fluent/core/workflow.py +++ b/src/ansys/fluent/core/workflow.py @@ -340,7 +340,10 @@ def get_id(self) -> str: type_, id_ = k.split(":") if type_ == "TaskObject": return id_ - raise RuntimeError("Task ID not found, should be unreachable") + raise RuntimeError( + f"Task ID not found for task '{self.name()}'. " + "This may indicate the task was not properly initialized." + ) def get_idx(self) -> int: """Get the unique integer index of this task, as it is in the application. From f549ee5d1e65aae98631a8483adc827aef8fe97f Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:23:48 +0000 Subject: [PATCH 4/6] chore: adding changelog file 5047.fixed.md [dependabot-skip] --- doc/changelog.d/5047.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/5047.fixed.md diff --git a/doc/changelog.d/5047.fixed.md b/doc/changelog.d/5047.fixed.md new file mode 100644 index 00000000000..5a1b472e495 --- /dev/null +++ b/doc/changelog.d/5047.fixed.md @@ -0,0 +1 @@ +BaseTask.get_id potentially returning None From e66c8a22c9715a72bf0507f0678cda6141015677 Mon Sep 17 00:00:00 2001 From: James Hilton-Balfe Date: Thu, 23 Apr 2026 16:21:42 +0100 Subject: [PATCH 5/6] Ignore lint error, you shouldn't be catching this runtime error explicitly --- src/ansys/fluent/core/workflow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ansys/fluent/core/workflow.py b/src/ansys/fluent/core/workflow.py index 388955aa397..6309c290c3c 100644 --- a/src/ansys/fluent/core/workflow.py +++ b/src/ansys/fluent/core/workflow.py @@ -325,7 +325,8 @@ def inactive_tasks(self) -> list: """ return [] - def get_id(self) -> str: + # pylint: disable=missing-raises-doc + def get_id(self) -> str: """Get the unique string identifier of this task, as it is in the application. Returns From c43e21a234a0c284ed7dadf043642ff5085ce723 Mon Sep 17 00:00:00 2001 From: James Hilton-Balfe Date: Thu, 23 Apr 2026 16:34:13 +0100 Subject: [PATCH 6/6] Apply suggestion from @Gobot1234 --- src/ansys/fluent/core/workflow.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ansys/fluent/core/workflow.py b/src/ansys/fluent/core/workflow.py index 6309c290c3c..3d4a051cb1b 100644 --- a/src/ansys/fluent/core/workflow.py +++ b/src/ansys/fluent/core/workflow.py @@ -325,8 +325,7 @@ def inactive_tasks(self) -> list: """ return [] - # pylint: disable=missing-raises-doc - def get_id(self) -> str: + def get_id(self) -> str: # pylint: disable=missing-raises-doc """Get the unique string identifier of this task, as it is in the application. Returns