diff --git a/tensorbay/client/segment.py b/tensorbay/client/segment.py index 79594e63e..43ad11e19 100644 --- a/tensorbay/client/segment.py +++ b/tensorbay/client/segment.py @@ -933,7 +933,7 @@ def upload_frame(self, frame: Frame, timestamp: Optional[float] = None) -> None: callback_bodies = [] for sensor_name, data in frame.items(): try: - callback_body = data.get_callback_body() # type:ignore[union-attr] + callback_body = data.get_callback_body() except AttributeError: continue diff --git a/tensorbay/utility/file.py b/tensorbay/utility/file.py index 4834b28b4..105b2ad24 100644 --- a/tensorbay/utility/file.py +++ b/tensorbay/utility/file.py @@ -220,3 +220,12 @@ def open(self) -> Union[UserResponse, BufferedReader]: self._write_cache(cache_path) return open(cache_path, "rb") + + def get_callback_body(self) -> Dict[str, Any]: + """Not support ``get_callback_body`` function. + + Raises: + AttributeError: when calling the ``get_callback_body()``. + + """ + raise AttributeError(f"Could not dump a '{self.__class__.__name__}' instance")