diff --git a/src/pydase/data_service/data_service_cache.py b/src/pydase/data_service/data_service_cache.py index 4c59da0..1134d66 100644 --- a/src/pydase/data_service/data_service_cache.py +++ b/src/pydase/data_service/data_service_cache.py @@ -3,7 +3,6 @@ from typing import TYPE_CHECKING, Any, cast from pydase.utils.serialization.serializer import ( SerializationPathError, - SerializationValueError, SerializedObject, get_nested_dict_by_path, set_nested_value_by_path, @@ -43,7 +42,7 @@ class DataServiceCache: cast(dict[str, SerializedObject], self._cache["value"]), full_access_path, ) - except (SerializationPathError, SerializationValueError, KeyError): + except (SerializationPathError, KeyError): return { "full_access_path": full_access_path, "value": None, diff --git a/src/pydase/utils/serialization/serializer.py b/src/pydase/utils/serialization/serializer.py index 261c5ce..ab3e8f7 100644 --- a/src/pydase/utils/serialization/serializer.py +++ b/src/pydase/utils/serialization/serializer.py @@ -51,10 +51,6 @@ class SerializationPathError(Exception): pass -class SerializationValueError(Exception): - pass - - class Serializer: @classmethod def serialize_object(cls, obj: Any, access_path: str = "") -> SerializedObject: # noqa: C901 @@ -358,7 +354,7 @@ def set_nested_value_by_path( next_level_serialized_object = get_container_item_by_key( current_dict, path_parts[-1], allow_append=True ) - except (SerializationPathError, SerializationValueError, KeyError) as e: + except (SerializationPathError, KeyError) as e: logger.error("Error occured trying to change %a: %s", path, e) return @@ -468,10 +464,6 @@ def get_container_item_by_key( If the path composed of `attr_name` and any specified index is invalid, or leads to an IndexError or KeyError. This error is also raised if an attempt to access a nonexistent key or index occurs without permission to append. - SerializationValueError: - If the retrieval results in an object that is expected to be a dictionary - but is not, indicating a mismatch between expected and actual serialized - data structure. """ processed_key = parse_serialized_key(key)