3b1b/manim · error · Exception

Not implemented

Error message

Not implemented

What it means

Generic Exception('Not implemented') raised by the abstract method CoordinateSystem.coords_to_point (manimlib/mobject/coordinate_systems.py:72). The class uses @abstractmethod but bodies raise plain Exception; if a subclass fails to override the method (or calls super().coords_to_point(...)), you get this at runtime instead of the usual TypeError at instantiation.

Source

Thrown at manimlib/mobject/coordinate_systems.py:72

class CoordinateSystem(ABC):
    """
    Abstract class for Axes and NumberPlane
    """
    dimension: int = 2

    def __init__(
        self,
        x_range: RangeSpecifier = DEFAULT_X_RANGE,
        y_range: RangeSpecifier = DEFAULT_Y_RANGE,
        num_sampled_graph_points_per_tick: int = 5,
    ):
        self.x_range = full_range_specifier(x_range)
        self.y_range = full_range_specifier(y_range)
        self.num_sampled_graph_points_per_tick = num_sampled_graph_points_per_tick

    @abstractmethod
    def coords_to_point(self, *coords: float | VectN) -> Vect3 | Vect3Array:
        raise Exception("Not implemented")

    @abstractmethod
    def point_to_coords(self, point: Vect3 | Vect3Array) -> tuple[float | VectN, ...]:
        raise Exception("Not implemented")

    def c2p(self, *coords: float) -> Vect3 | Vect3Array:
        """Abbreviation for coords_to_point"""
        return self.coords_to_point(*coords)

    def p2c(self, point: Vect3) -> tuple[float | VectN, ...]:
        """Abbreviation for point_to_coords"""
        return self.point_to_coords(point)

    def get_origin(self) -> Vect3:
        return self.c2p(*[0] * self.dimension)

    @abstractmethod
    def get_axes(self) -> VGroup:

View on GitHub (pinned to dee01804d4)

Solutions

  1. Implement coords_to_point in your subclass, mapping (x, y[, z]) tuples to scene points
  2. If you don't need a custom mapping, inherit from Axes or NumberPlane instead of the base CoordinateSystem
  3. Search for super().coords_to_point calls and replace with concrete parent logic

Example fix

# before
class LogAxes(CoordinateSystem):
    def point_to_coords(self, p):
        return (10 ** p[0], p[1])
    # missing coords_to_point -> raises "Not implemented"

# after
class LogAxes(CoordinateSystem):
    def coords_to_point(self, *coords):
        return self.c2p(  # delegate to implemented mapping
            *map(lambda c: __import__('math').log10(c) if c > 0 else 0, coords)
        )
    def point_to_coords(self, p):
        return (10 ** p[0], p[1])
Defensive patterns

Strategy: type-guard

Validate before calling

import inspect

def implements_coords_to_point(cls) -> bool:
    m = cls.coords_to_point
    base = CoordinateSystem.coords_to_point
    return getattr(m, '__func__', m) is not getattr(base, '__func__', base)

Type guard

def is_concrete_coord_system(obj) -> bool:
    return (
        isinstance(obj, CoordinateSystem)
        and CoordinateSystem.coords_to_point is not type(obj).coords_to_point
        and CoordinateSystem.point_to_coords is not type(obj).point_to_coords
        and CoordinateSystem.get_axes is not type(obj).get_axes
        and CoordinateSystem.get_all_ranges is not type(obj).get_all_ranges
    )

Prevention

When it happens

Trigger: Defining a class inheriting Axes/ThreeDAxes/Camera-style CoordinateSystem without implementing coords_to_point; calling super().coords_to_point() inside a subclass; instantiating a half-implemented custom coordinate system subclass.

Common situations: Writing a custom coordinate system (polar variants, log-scale axes, custom projections) and missing a required method; version upgrades adding abstract methods that old subclasses never implemented.

Related errors


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