3b1b/manim · error · Exception

Not Implemented

Error message

Not Implemented

What it means

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).

Source

Thrown at manimlib/animation/creation.py:45

    Abstract class for ShowCreation and ShowPassingFlash
    """
    def __init__(self, mobject: Mobject, should_match_start: bool = False, **kwargs):
        self.should_match_start = should_match_start
        super().__init__(mobject, **kwargs)

    def interpolate_submobject(
        self,
        submob: Mobject,
        start_submob: Mobject,
        alpha: float
    ) -> None:
        submob.pointwise_become_partial(
            start_submob, *self.get_bounds(alpha)
        )

    @abstractmethod
    def get_bounds(self, alpha: float) -> tuple[float, float]:
        raise Exception("Not Implemented")


class ShowCreation(ShowPartial):
    def __init__(self, mobject: Mobject, lag_ratio: float = 1.0, **kwargs):
        super().__init__(mobject, lag_ratio=lag_ratio, **kwargs)

    def get_bounds(self, alpha: float) -> tuple[float, float]:
        return (0, alpha)


class Uncreate(ShowCreation):
    def __init__(
        self,
        mobject: Mobject,
        rate_func: Callable[[float], float] = lambda t: smooth(1 - t),
        remover: bool = True,
        should_match_start: bool = True,
        **kwargs,

View on GitHub (pinned to dee01804d4)

Solutions

  1. 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
  2. Prefer deriving from the concrete ShowCreation, Uncreate, or ShowPassingFlash instead of ShowPartial directly
  3. If you intended a plain reveal, just use ShowCreation(mobject) and drop the custom subclass

Example fix

# before
class ShowHalf(ShowPartial):
    def __init__(self, mobject, **kwargs):
        super().__init__(mobject, **kwargs)
# after
class ShowHalf(ShowPartial):
    def __init__(self, mobject, **kwargs):
        super().__init__(mobject, **kwargs)

    def get_bounds(self, alpha: float) -> tuple[float, float]:
        return (0, 0.5 * alpha)
Defensive patterns

Strategy: type-guard

Validate before calling

assert hasattr(anim, "get_bounds") and type(anim).get_bounds is not ShowPartial.get_bounds, "ShowPartial subclass must implement get_bounds"

Type guard

def implements_get_bounds(cls: type) -> bool:
    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)

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of 3b1b/manim@dee01804d4 (2026-08-14). Data as JSON: /api/errors/d29f0eaac130a9fd. Report an issue: GitHub.