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 | 8 |
| 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 | 3 |
| 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 | 7 |
| K15xx / W15xx | Interactive lessons | 6 |
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= |
W0120 |
warning (lint) | allow that silences nothing |
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.
W0120: allow that silences nothing#
Warning (lint). A # kinemo: allow CODE comment whose code no longer reports anything on its line (the lint was fixed, or the code moved): remove it, so a real problem there is not hidden later. kinemo check --fix removes it.
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#
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 |
K0802 |
error | unknown code language |
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. Specify the matches (match={...}), or swap them with a fade (s.play(k.fade_out(a), k.fade_in(b))). Between two texts (text, math, code) the crossfade is the expected result and is not reported.
K0802: unknown code language#
Error. k.Code highlights the languages listed in the message; lang="text" shows any code without colors.
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. Objects entirely offstage are not reported; for one cropped on purpose, bleed=True. A moving object is reported when the frame edge cuts it on its way between two places inside the frame (a swap arc, an overshooting ease); entrances and exits through the edge are not.
W1002: text over text#
Warning (lint). Two texts overlap by more than 10% of their area. Text marked emphasis="decorative" (a backdrop) does not count.
W1003: low contrast#
Warning (lint). Contrast between text and what is behind it (the background, or a filled shape under it such as a card or a speech bubble) is below 4.5:1. Text dimmed on purpose (an off bit, a de-emphasized card) takes emphasis="low" and is judged against 3:1; text not meant to be read takes emphasis="decorative" and is not judged (nor by W1002 and W1004). Children inherit it.
W1004: small text#
Warning (lint). Text smaller than 18 px at the final resolution. Text with emphasis="decorative" (not meant to be read) is not judged.
W1005: invisible object#
Warning (lint). Object invisible for more than 3 s, never removed and not seen again.
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 |
|---|---|---|
K1401 |
error | TTS command failed |
W1401 |
warning (lint) | voice without a TTS provider |
W1402 |
warning (lint) | unknown TTS provider |
W1403 |
warning (lint) | content runs past the narration |
W1404 |
warning (lint) | stale narration |
W1405 |
hint (does not fail --strict) |
narration without audio yet |
W1407 |
warning (lint) | captions without narration |
K1401: TTS command failed#
Error. The command provider ([tts] provider = "command") has no command, could not start, exited with an error or wrote no audio. The message quotes the end of its error output.
Fix:
Run the command by hand with a short text; check `[tts] command` in kinemo.toml.
W1401: voice without a TTS provider#
Warning (lint). No provider configured: silence with an estimated duration.
W1402: unknown TTS provider#
Warning (lint). [tts] provider in kinemo.toml names a provider that is not installed (a typo, or its package is missing): the voice becomes silence with an estimated duration.
Fix:
Install `kinemo-tts-<name>`, or use one of the installed providers the message lists.
W1403: content runs past the narration#
Warning (lint). The animations inside a with s.voice(...) block last more than 0.25 s longer than its narration, so the next line starts late and the silence shows.
Fix:
Shorten or speed up the animations, sync them to the line with `v.at(...)`, or lengthen the narration. An animation meant to keep going after the line (a dial that rolls on) is started with `s.start(...)` instead of `s.play(...)`: it does not hold the next line back, and `kinemo check --fix` makes that change when the last `play` of the block is the one that runs past.
W1404: stale narration#
Warning (lint). A beat of a k.Script has recorded audio made from a different text (per audio/manifest.json): the script changed after the audio was made.
Fix:
Make the audio again: `kinemo voice <scene file>` (only missing and stale beats), or `--force <id>`.
W1405: narration without audio yet#
Hint (does not fail --strict). A line has no audio and this build does not make it (kinemo check never does; [tts] on_build = "estimate", the default for the command provider): its length is estimated from [tts] wpm.
Fix:
`kinemo voice <scene file>` makes every missing line in one run; `kinemo render` makes them before rendering.
W1407: captions without narration#
Warning (lint). k.Captions() shows the scene's s.voice lines; this scene has none, so there is nothing to caption.
K15xx / W15xx: Interactive lessons#
| Code | Severity | Title |
|---|---|---|
K1501 |
error | branch out of place |
W1501 |
warning (lint) | wrong branch that never plays |
K1502 |
error | no lesson player |
W1502 |
warning (lint) | question asked mid-motion |
W1503 |
warning (lint) | quiz band over text (retired) |
W1504 |
warning (lint) | quiz prompt too long to read |
K1501: branch out of place#
Error. A question's branches (with q.correct():, with q.wrong():) come right after s.ask(...), one of each kind, and cannot hold another question: the lesson continues after the last branch.
W1501: wrong branch that never plays#
Warning (lint). Every possible answer counts as correct (all the options, or a tolerance covering the whole range), so the learner can never reach q.wrong().
K1502: no lesson player#
Error. --format lesson copies the player's WebAssembly from the kinemo package; the published wheels include it, a source checkout builds it with python scripts/build_player.py.
W1502: question asked mid-motion#
Warning (lint). An animation started before s.ask is still running when playback stops for the question: the learner sees a frozen, half-finished move, and every branch starts from it.
Fix:
Let it finish first (`s.wait(...)`), or start it after the question.
W1503: quiz band over text (retired)#
Warning (lint). Reported by 0.21.0 when a quiz video's band covered text of the scene. Since 0.21.1 the scene shrinks beside the band while it is shown, so nothing is covered and this lint is no longer reported.
W1504: quiz prompt too long to read#
Warning (lint). The question and its options take longer to read (about 3 words a second) than the think= seconds a quiz video gives.
Fix:
Give more time (`think=`) or shorten the prompt.