Diagnostics

Error and lint codes reported by kinemo check, the preview and the build.

Every problem kinemo reports has a stable code: K codes are errors, W codes are lints (warnings; kinemo check --strict treats them as errors). Codes never change meaning and are never reused. kinemo explain <code> prints the same explanation in the terminal and kinemo check --fix applies the safe fixes. A lint can be allowed on one line with # kinemo: allow W1002 or for the whole project in kinemo.toml ([lints] allow).

Range Area Codes
K00xx General 1
K01xx Object lifecycle 7
K02xx / W02xx Animations, conflicts, interpolation 5
K03xx / W03xx Reactive system 10
K04xx Layout and constraints 4
K05xx Resolution (loops, convergence) 1
K06xx / W06xx Components 2
K07xx / W07xx Events 3
K08xx / W08xx Text and math 2
W09xx Performance 1
W10xx Visual legibility 7
K11xx Names from other libraries (Manim) 6
K12xx Data and interoperability (Arrow, arrays) 4
W13xx Parameters and export 2
W14xx Audio and voice 1

K00xx: General

Code Severity Title
K0001 error Python exception during build

K0001: Python exception during build

Error. The scene code raised an ordinary Python exception.

K01xx: Object lifecycle

Code Severity Title
K0101 error object not in the scene
K0102 error object already removed
K0103 error object with two parents
K0104 error outside scene construction
K0105 error invalid argument
K0106 error unknown prop
W0110 warning (lint) play with at=

K0101: object not in the scene

Error. Creating an object does not put it in the scene. .to() only animates objects that have entered, via s.add(obj) or an entrance verb (k.draw, k.write, k.fade_in, k.grow).

Example that triggers it:

c = k.Circle()
s.play(c.to(x=2))

Fix:

s.play(k.draw(c))
s.play(c.to(x=2))

K0102: object already removed

Error. The object left the scene (s.remove, k.fade_out, k.shrink) before the animation's time. Bring it back with an entrance verb or animate it before it exits.

K0103: object with two parents

Error. An object belongs to exactly one group. To show the same visual in two places, copy it (obj.copy()); to change groups while keeping its position, use k.reparent(obj, new_parent).

K0104: outside scene construction

Error. Objects, signals and animations belong to a scene. Create them inside the function decorated with @k.scene (or inside a clip, a handler or a component's build()).

K0105: invalid argument

Error. An argument has a type or value the API does not accept.

K0106: unknown prop

Error. The object has no such prop. See kinemo docs <Type>.

W0110: play with at=

Warning (lint). play(..., at=) does not move the cursor; use s.start(..., at=) to make that explicit.

K02xx / W02xx: Animations, conflicts, interpolation

Code Severity Title
K0201 error two animations on the same prop
K0202 error invalid duration
K0203 error not an animation
K0204 error non-reversible animation in during
K0205 error type without interpolation

K0201: two animations on the same prop

Error. Two animations write the same prop of the same object over overlapping intervals. Chain them (k.seq) or, if summing them is intended, use blend="add" on the second one.

K0202: invalid duration

Error. Durations and waits must be finite, non-negative numbers.

K0203: not an animation

Error. s.play/s.start take k.Animation values (verbs, .to(), clips).

K0204: non-reversible animation in during

Error. s.during reverts what it applied when the block ends; it only accepts state changes (.to) and k.indicate. Entrance/exit verbs have no reverse.

K0205: type without interpolation

Error. Lists and custom types must declare how to interpolate: k.signal([...], lerp=k.lerp.pointwise) or lerp=None to switch in a single step.

K03xx / W03xx: Reactive system

Code Severity Title
K0301 error tracked read outside a reactive context
K0302 error x.now inside a lambda
K0303 error derived values are read-only
K0304 error signal used as a boolean
K0305 error signal converted to a number
K0306 error write inside a derived value
K0310 error untraceable function
W0310 warning (lint) lambda in a loop
W0311 warning (lint) captured Python list
W0312 warning (lint) eased clock

K0301: tracked read outside a reactive context

Error. x() only works inside prop lambdas, k.computed and .map functions. In the scene body, read the value at the cursor with x.now.

K0302: x.now inside a lambda

Error. x.now inside a lambda would freeze the value at build time. Use x() so the lambda follows the signal.

K0303: derived values are read-only

Error. Derived values are recomputed from their sources; animate the source.

K0304: signal used as a boolean

Error. if signal: has no single value: the signal changes over time. Use x.now > 2 to decide at the cursor, or k.when(x > 2, ...) to react during playback.

K0305: signal converted to a number

Error. Functions like math.sin need a number; a signal is a value over time. Use k.sin(x) (native) or x.map(k.python(math.sin)).

K0306: write inside a derived value

Error. Derived values are pure: they do not write to signals.

K0310: untraceable function

Error. The function uses something that cannot be compiled to the IR (math.*, if on a symbolic value, external libraries). Replace it with the native k building blocks or accept the cost with k.python(fn).

W0310: lambda in a loop

Warning (lint). The lambda captures the loop variable by reference; use lambda i=i: or .map.

W0311: captured Python list

Warning (lint). Plain lists are not tracked; use k.list([...]).

W0312: eased clock

Warning (lint). A signal used as a clock must advance linearly; use k.time.map(...).

K04xx: Layout and constraints

Code Severity Title
K0401 error axis held by a constraint
K0402 error constraint cycle
K0403 error conflicting constraints
K0404 error unknown anchor

K0401: axis held by a constraint

Error. The object's position comes from a constraint (place, a container or a binding). Change the constraint with an animation via .to_place(...), release it with .to(..., unpin=True) (or .unpin() at the cursor), or drop a binding with .unbind().

K0402: constraint cycle

Error. The constraints depend on each other in a cycle; break one of them.

K0403: conflicting constraints

Error. Two constraints compete for the same axis. Remove one or mark the weaker one with weak=True.

K0404: unknown anchor

Error. Valid anchors: center, top, bottom, left, right and combinations such as top-left.

K05xx: Resolution (loops, convergence)

Code Severity Title
K0501 error event loop

K0501: event loop

Error. Events and handlers did not converge within 8 passes.

K06xx / W06xx: Components

Code Severity Title
K0601 error signal in a static field
K0602 error unassigned out

K0601: signal in a static field

Error. Declare the field as k.Prop[T] to accept reactive values.

K0602: unassigned out

Error. Every k.Out must be assigned in build().

K07xx / W07xx: Events

Code Severity Title
W0701 warning (lint) handler object never removed
K0702 error event did not happen before the timeout
K0703 error event already happened

W0701: handler object never removed

Warning (lint). Objects created in handlers should leave the scene.

K0702: event did not happen before the timeout

Error. No trigger before the timeout.

K0703: event already happened

Error. The event happened before the cursor; use s.start instead of the earlier play.

K08xx / W08xx: Text and math

Code Severity Title
K0801 error unsupported LaTeX command
W0801 warning (lint) morph without matches

K0801: unsupported LaTeX command

Error. Use engine="tex" for packages the built-in engine does not cover.

W0801: morph without matches

Warning (lint). The shapes have nothing in common; the morph does a warp + crossfade.

W09xx: Performance

Code Severity Title
W0901 warning (lint) too many individual objects

W0901: too many individual objects

Warning (lint). Use vectorized types (k.Points, k.VectorField).

W10xx: Visual legibility

Code Severity Title
W1001 warning (lint) outside the safe area
W1002 warning (lint) text over text
W1003 warning (lint) low contrast
W1004 warning (lint) small text
W1005 warning (lint) invisible object
W1006 warning (lint) visual noise
W1007 warning (lint) static scene

W1001: outside the safe area

Warning (lint). The object extends beyond the frame's safe area.

W1002: text over text

Warning (lint). Two texts overlap by more than 10% of their area.

W1003: low contrast

Warning (lint). Contrast between text and background is below 4.5:1.

W1004: small text

Warning (lint). Text smaller than 18 px at the final resolution.

W1005: invisible object

Warning (lint). Object invisible for more than 3 s and never removed.

W1006: visual noise

Warning (lint). More than 12 short simultaneous animations.

W1007: static scene

Warning (lint). More than 8 s without visual change.

K11xx: Names from other libraries (Manim)

Code Severity Title
K1101 error Manim name
K1102 error Manim .animate
K1103 error Manim self.play
K1104 error Manim ValueTracker
K1105 error Manim updater
K1106 error Manim direction constant

K1101: Manim name

Error. Manim verbs have a direct equivalent in k. (see the Manim → kinemo table).

K1102: Manim .animate

Error. In kinemo, an animated state change is s.play(obj.to(...)).

K1103: Manim self.play

Error. The scene receives s: k.Scene; use s.play(...).

K1104: Manim ValueTracker

Error. Use k.signal(value).

K1105: Manim updater

Error. Pass a signal or a lambda to the prop: obj.set(x=other.x).

K1106: Manim direction constant

Error. Position comes from constraints (place) or from x=/y=.

K12xx: Data and interoperability (Arrow, arrays)

Code Severity Title
K1201 error data without Arrow
K1202 error missing column
K1203 error column with the wrong type
K1204 error duplicate key

K1201: data without Arrow

Error. The object does not implement the Arrow PyCapsule Interface.

K1202: missing column

Error. The table has no column with that name; check x=, y= and key=.

K1203: column with the wrong type

Error. Chart values need a numeric column (int, float or decimal).

K1204: duplicate key

Error. Each row of a chart needs a unique key (key=); aggregate the data or pick another column.

W13xx: Parameters and export

Code Severity Title
W1301 warning (lint) parameter read with .now
W1302 warning (lint) k.python depending on a parameter

W1301: parameter read with .now

Warning (lint). It is fixed at build time and does not become an interactive control.

W1302: k.python depending on a parameter

Warning (lint). It cannot be precomputed for the interactive web player.

W14xx: Audio and voice

Code Severity Title
W1401 warning (lint) voice without a TTS provider

W1401: voice without a TTS provider

Warning (lint). No provider configured: silence with an estimated duration.