From b61b56d590d2bdcde85203a1f43222ebe40e54ac Mon Sep 17 00:00:00 2001 From: Brent Yi Date: Wed, 25 Sep 2024 03:14:43 +0000 Subject: [PATCH] Warning --- src/viser/_scene_handles.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/viser/_scene_handles.py b/src/viser/_scene_handles.py index 429b3492..1cc9364a 100644 --- a/src/viser/_scene_handles.py +++ b/src/viser/_scene_handles.py @@ -2,6 +2,7 @@ import copy import dataclasses +import warnings from functools import cached_property from typing import ( TYPE_CHECKING, @@ -223,9 +224,11 @@ def visible(self, visible: bool) -> None: def remove(self) -> None: """Remove the node from the scene.""" - # No-op if already removed. + # Warn if already removed. if self._impl.removed: + warnings.warn(f"Attempted to remove already removed node: {self.name}") return + self._impl.removed = True self._impl.api._websock_interface.queue_message( _messages.RemoveSceneNodeMessage(self._impl.name)