{"record":{"id":"d29f0eaac130a9fd","repo":"3b1b/manim","slug":"not-implemented-d29f0e","errorCode":null,"errorMessage":"Not Implemented","messagePattern":"Not Implemented","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"manimlib/animation/creation.py","lineNumber":45,"sourceCode":"    Abstract class for ShowCreation and ShowPassingFlash\n    \"\"\"\n    def __init__(self, mobject: Mobject, should_match_start: bool = False, **kwargs):\n        self.should_match_start = should_match_start\n        super().__init__(mobject, **kwargs)\n\n    def interpolate_submobject(\n        self,\n        submob: Mobject,\n        start_submob: Mobject,\n        alpha: float\n    ) -> None:\n        submob.pointwise_become_partial(\n            start_submob, *self.get_bounds(alpha)\n        )\n\n    @abstractmethod\n    def get_bounds(self, alpha: float) -> tuple[float, float]:\n        raise Exception(\"Not Implemented\")\n\n\nclass ShowCreation(ShowPartial):\n    def __init__(self, mobject: Mobject, lag_ratio: float = 1.0, **kwargs):\n        super().__init__(mobject, lag_ratio=lag_ratio, **kwargs)\n\n    def get_bounds(self, alpha: float) -> tuple[float, float]:\n        return (0, alpha)\n\n\nclass Uncreate(ShowCreation):\n    def __init__(\n        self,\n        mobject: Mobject,\n        rate_func: Callable[[float], float] = lambda t: smooth(1 - t),\n        remover: bool = True,\n        should_match_start: bool = True,\n        **kwargs,","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/3b1b/manim/blob/dee01804d47b9f94402d71472674710dcac125b8/manimlib/animation/creation.py#L27-L63","documentation":"ShowPartial is an abstract animation that progressively reveals part of a mobject; subclasses must implement get_bounds(alpha) returning the (start, end) fraction of the mobject to show. The base implementation raises a generic 'Not Implemented' Exception (despite the @abstractmethod decorator, Python does not prevent instantiation, so a subclass missing get_bounds reaches this at runtime during interpolate_submobject).","triggerScenarios":"Defining a subclass of ShowPartial without overriding get_bounds and playing it: get_bounds(alpha) is called on every interpolated submobject, so the Exception fires as soon as the animation starts.","commonSituations":"Writing a custom partial-reveal animation and forgetting get_bounds; subclassing ShowCreation and accidentally overriding get_bounds with a method that calls super().get_bounds(); copy-pasting a custom animation from an older manim version whose API differed.","solutions":["Implement get_bounds(self, alpha) -> tuple[float, float] in your subclass, e.g. return (0, alpha) for a reveal or (1 - alpha, 1) for an unreveal","Prefer deriving from the concrete ShowCreation, Uncreate, or ShowPassingFlash instead of ShowPartial directly","If you intended a plain reveal, just use ShowCreation(mobject) and drop the custom subclass"],"exampleFix":"# before\nclass ShowHalf(ShowPartial):\n    def __init__(self, mobject, **kwargs):\n        super().__init__(mobject, **kwargs)\n# after\nclass ShowHalf(ShowPartial):\n    def __init__(self, mobject, **kwargs):\n        super().__init__(mobject, **kwargs)\n\n    def get_bounds(self, alpha: float) -> tuple[float, float]:\n        return (0, 0.5 * alpha)","handlingStrategy":"type-guard","validationCode":"assert hasattr(anim, \"get_bounds\") and type(anim).get_bounds is not ShowPartial.get_bounds, \"ShowPartial subclass must implement get_bounds\"","typeGuard":"def implements_get_bounds(cls: type) -> bool:\n    return \"get_bounds\" in cls.__dict__ or any(\"get_bounds\" in c.__dict__ for c in cls.__mro__[1:-1] if c is not ShowPartial)","tryCatchPattern":null,"preventionTips":["Prefer composing ShowCreation/Uncreate/ShowPassingFlash over subclassing ShowPartial","Add unit tests that instantiate and begin() custom animations once with alpha=0 to catch missing abstract methods"],"tags":["animation","abstract-method","creation","subclassing"],"backgroundTag":null,"analyzedSha":"dee01804d47b9f94402d71472674710dcac125b8","analyzedAt":"2026-08-14T19:53:44.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}