diff --git a/webknossos/webknossos/dataset/view.py b/webknossos/webknossos/dataset/view.py index 4918bcb95..2392ca9d1 100644 --- a/webknossos/webknossos/dataset/view.py +++ b/webknossos/webknossos/dataset/view.py @@ -960,7 +960,8 @@ def _array(self) -> None: self._cached_array = None def __del__(self) -> None: - del self._cached_array + if hasattr(self, "_cached_array"): + del self._cached_array def __getstate__(self) -> Dict[str, Any]: d = dict(self.__dict__)