diff --git a/src/ansys/mapdl/core/mapdl_core.py b/src/ansys/mapdl/core/mapdl_core.py index 21821ca817..e248e5b311 100644 --- a/src/ansys/mapdl/core/mapdl_core.py +++ b/src/ansys/mapdl/core/mapdl_core.py @@ -1454,7 +1454,7 @@ def __enter__(self): def __exit__(self, *args): """Restore the original routine.""" self._parent()._log.debug(f"Restoring routine '{self._cached_routine}'") - self._mapdl._resume_routine() + self._parent()._resume_routine() @property def _cached_routine(self):