Troubleshooting
Every error Mode 8 prints, as you will see it on a terminal, and what to do about it.
Mode 8 tells you what went wrong and what to do next, in at most three lines. This page shows each error as it really appears and the fix. Search it for the first words of your message.
Read the error first#
On a terminal an error is three lines on stderr: what went wrong, the closest correct name when you mistyped one, and the next step. A program that reads the output gets one JSON object on stdout instead, with the same facts as keys: error.type, error.msg, and often suggestions and hint. Skill and scripts lists the types.
The exit code says what kind of problem it is:
| Exit | Meaning | What to do |
|---|---|---|
1 | A check failed: the command ran and reports "pass": false. | Fix the art or the setup the report names. |
2 | Your input is wrong. Nothing was written. | Fix the command. Running it again unchanged gives the same error. |
3 | Something outside your input failed: ComfyUI, the disk, a file that changed, a newer project. | Read the message; it says what to do. |
Command-line mistakes#
"unknown option"#
A misspelled flag is refused, with the closest real one:
$ mode8 draft knight_right --colour red --out hero.png
error: unknown option --colour red
did you mean --colors?
example: mode8 draft knight_right --out drafts/hero.pngEvery command lists its flags with mode8 <command> --help. Flags are never abbreviated: write --palette in full.
"unknown archetype", tile kind, palette or rig#
A name that is not on the list is refused with the closest matches, and the command that prints the whole list:
$ mode8 draft knight --out hero.png
error: unknown archetype 'knight'
did you mean knight_right or knight_left?
all of them: mode8 list archetypesmode8 list prints every list Mode 8 has: palettes, archetypes, tiles, rigs, templates, art types, effects and materials.
"missing --out"#
Commands that write a file need to know where:
$ mode8 draft knight_right
error: missing --out
example: mode8 draft knight_right --out drafts/hero.pngA value "must be within"#
Sizes, counts and frame rates have limits, and a value over one is refused before anything runs:
$ mode8 draft knight_right --size 2000x10 --out big.png
error: size sides must be within 1..1024, got 2000x10
example: mode8 draft knight_right --out drafts/hero.pngLimits lists every one.
"--out must end in .png"#
Mode 8 writes PNG files, and says so rather than writing a PNG under another name:
$ mode8 draft knight_right --out hero.jpg
error: --out must end in .png: hero.jpg
example: mode8 draft knight_right --out drafts/hero.pngA flag from an older build#
Flags renamed before the first release are refused with their new name in the hint, never silently ignored: the old report-format flag, for example, points at --json and --human. Stability and versioning lists the renames.
Files and folders#
"not found"#
A missing input file is an error that says what the folder does have:
$ mode8 lint sprites/hero.png
error: sprite not found: sprites/hero.png
the current folder has no sprites/Paths are relative to the folder you run the command in. Inside a project, that is usually the project's root.
"palette ... not found"#
A palette is a bundled name (mode8 list palettes), a palette in the project's palettes/ folder, or a .gpl, .hex or .txt file:
$ mode8 draft slime --palette gameboy --out slime.png
error: palette 'gameboy' not found as a file or a bundled palette
did you mean gameboy_dmg?
all palettes: mode8 list palettes"cannot write"#
An output in a folder that cannot exist or that you cannot write to is refused before any work is done:
$ mode8 draft slime --out /proc/slime.png
error: cannot write --out /proc/slime.png: no such file or directory (/proc/slime.png)
choose a location you can write toMissing folders inside your own directories are created for you: --out drafts/new/slime.png just works.
"no PNG frames found"#
mode8 export reads a folder of frames, or the frame files you name:
$ mkdir empty
$ mode8 export empty --out-dir exports
error: no PNG frames found for 'empty'
example: mode8 export frames/hero --out-dir exports/hero --name heroPoint it at the folder mode8 anim wrote (frames/hero), or at a project asset's assets/<name>/frames.
"nothing to verify"#
mode8 verify refuses to pass a check it could not run:
$ mode8 verify --assets-dir empty --check-anim
error: nothing to verify: no PNG found under empty; point --assets-dir at the folder holding the exported sprites (e.g. <project>/assets)
example: mode8 verify --assets-dir frames --check-animPoint --assets-dir at the folder that holds the PNGs. With --check-anim, each subfolder of two or more frames is one animation; add --include-root to treat loose PNGs as one animation.
Checks that fail#
Lint finds off-palette colors in a fresh draft#
A draft made without --palette uses neutral default colors, so it fails a check against a palette it was never drawn in:
$ mode8 draft slime --out slime.png
✓ Drafted slime (48x40) → slime.png
Next:
mode8 gen 'slime, side view' --draft slime.png --out sprites/slime.png # needs ComfyUI
mode8 anim slime.png --rig blob --out-dir frames/slime
mode8 studio .
$ mode8 lint slime.png --palette gameboy_dmg
✗ slime.png fails lint
48x40 · 8 colors
✗ 8 off-palette colors (#11101c, #123f2c, #286037, #2c2b3f, #4b853e, #79a946,
#abcd62, #eeecd9), 1162 px
Next:
mode8 lint slime.png --palette gameboy_dmg --fix --out slime_fixed.png # repair alpha, islands, paletteMake the draft in the palette you want (mode8 draft slime --palette gameboy_dmg ...), or let lint repair it into a new file:
$ mode8 lint slime.png --palette gameboy_dmg --fix --out slime_gb.png
✓ slime_gb.png passes lint
48x40 · 4 colors
fixed: palette snapped
Next:
mode8 lint slime_gb.png --quality # also check noise, jaggies, ramps--fix makes binary alpha, removes stray islands and snaps every color to the nearest palette color. It never overwrites the input when you give --out.
--quality-strict exits 1 although lint passes#
--quality adds advisory checks (stray pixels, jagged lines, color ramps) that report issues without failing; --quality-strict makes those issues fail the command. Read the report's issues, or drop -strict while you work. See Checks.
mode8 doctor exits 1#
doctor is a check: it exits 1 when anything AI generation needs is missing, and every failed line says how to fix it. If you only use the commands that run on the CPU, you can ignore it. See Set up local AI.
Projects#
"not inside a Mode 8 project"#
The project commands (layers, the Studio's project features) need a project. Run them inside one, or name it:
$ mode8 layers list --asset hero
error: not inside a Mode 8 project (no mode8.toml here or above); pass --project-root DIR
cd into a project, or create one: mode8 init my-game"asset already exists"#
An asset name is never reused by accident. Importing the same name twice is refused:
$ mode8 init my-game
✓ Created project my-game/
palette nes_crimson_hero · new assets 64x72 · ComfyUI http://127.0.0.1:8188
Next:
cd my-game
mode8 draft knight_right --out drafts/hero.png
mode8 studio .
mode8 doctor # check the local AI setup for mode8 gen
$ cd my-game
$ mode8 draft slime --out drafts/slime.png
✓ Drafted slime (48x40) → drafts/slime.png
palette nes_crimson_hero from mode8.toml
Next:
mode8 gen 'slime, side view' --draft drafts/slime.png --out sprites/slime.png # needs ComfyUI
mode8 anim drafts/slime.png --rig blob --out-dir frames/slime
mode8 studio .
$ mode8 import drafts/slime.png --name slime
✓ Imported slime: 1 frame (48x40) → assets/slime/
palette slime (new)
Next:
mode8 studio .
mode8 export assets/slime/frames --out-dir exports/slime --name slime --animations assets/slime/master.m8.json$ mode8 import drafts/slime.png --name slime
error: asset already exists: slime
pick another --name, or edit the existing assetPick another --name, or edit the existing asset.
"mode8.toml already exists and differs"#
mode8 init never rewrites a project's settings:
$ mode8 init . --default-palette gameboy_dmg
error: /home/you/work/my-game/mode8.toml already exists and differs from --default-palette 'gameboy_dmg' (mode8.toml default_palette = 'nes_crimson_hero'); init never rewrites an existing config -- edit mode8.toml instead
edit /home/you/work/my-game/mode8.toml, or drop --default-paletteEdit mode8.toml instead.
The project was made by a newer Mode 8#
A project remembers the format version that wrote it. An older Mode 8 refuses it rather than damage it. Here the version is raised by hand to show the error:
$ sed -i 's/^version = 1/version = 99/' mode8.toml
$ mode8 layers list --asset slime
error: project format version 99 in /home/you/work/my-game/mode8.toml is newer than this Mode 8 supports (version 1); upgrade Mode 8 to open this project
this project was saved by a newer Mode 8: update Mode 8 (as you installed it), then retryUpdate Mode 8 (see Install Mode 8). Never lower version by hand: an older Mode 8 cannot know what the newer format changed.
"conflict on ... expected sha256"#
A ConflictError (exit 3) means the file changed between your read and your write, usually because a person or an agent edited it. Nothing was overwritten. Read the asset again, redo your edit on the new pixels and write with the new hash. Co-editing walks through one.
"asset ... has N layers"#
A LayeredAssetError (exit 3) means you tried to replace the master of an asset that has a layer stack. Edit one layer instead. See Co-editing.
"nothing to undo"#
NothingToUndoError and NothingToRedoError (exit 2) mean the asset's history has nothing in that direction. Every asset report carries can_undo and can_redo: check them first.
AI generation#
"ComfyUI not reachable"#
mode8 gen, inpaint, cast and doctor talk to a local ComfyUI. When nothing answers, they stop with exit 3 and the command that starts it. Here Mode 8 is pointed at a port where nothing runs:
$ mode8 draft knight_right --out hero.png
✓ Drafted knight_right (64x72) → hero.png
Next:
mode8 gen 'armored knight with plumed helm, side view, facing right' --draft hero.png --out sprites/hero.png # needs ComfyUI
mode8 anim hero.png --rig humanoid --out-dir frames/hero
mode8 studio .
$ mode8 gen "armored knight" --draft hero.png --out knight.png --comfy-url http://127.0.0.1:8189
error: ComfyUI not reachable at http://127.0.0.1:8189 (no answer).
Start ComfyUI (`python main.py --listen 127.0.0.1 --port 8188`), or point Mode 8 at it with --comfy-url / COMFY_URL / mode8.toml comfy_url; `mode8 doctor` checks the setup.Start ComfyUI, then check the whole setup with mode8 doctor. Set up local AI walks through it.
Which ComfyUI is used#
The first of these that is set wins: the --comfy-url flag (MCP comfy_url), the COMFY_URL environment variable, comfy_url in the nearest mode8.toml at or above the current folder, then http://127.0.0.1:8188. mode8 doctor reports the address it used and where it came from (comfy_url_source).
"--preset kleinedit repaints a pose draft"#
The default preset repaints a draft, so mode8 gen without --draft stops with exit 2 and tells you to make one with mode8 draft. To draw from the prompt alone, pick an art type that does (--art-type icon, portrait, scene or isometric) or pass --preset style. See Sprites.
No candidate passes#
gen renders several candidates, checks each against measured quality rules and keeps the best. When none passes, it still writes the best one and exits 1, so you can look before you decide. Keep every candidate with --keep-candidates DIR and compare them on a --sheet; the report's failed_rules names what each one missed.
Servers#
mode8 studio or mode8 mcp needs an extra#
The Studio and the MCP server have their own dependencies. Without them the command stops with exit 3 and the exact install command: pip install -e ".[studio]", ".[mcp]", or ".[all]" for both.
The Studio's port is busy#
mode8 studio uses port 8420. If another program has it, the Studio stops with exit 3; pass another one, such as --port 8500.
The Studio refuses another device#
The Studio answers only on 127.0.0.1 with a secret token in its URL. To open it from another device on your network, start it with --host 0.0.0.0 --allow-host NAME, where NAME is the host name or address that device uses, and open the URL the Studio prints, token included.
Still stuck#
Run the command again with --json and read error.type and error.hint. mode8 doctor --json describes your environment (Mode 8, Python, platform, extras, Godot). Include both when you open an issue at https://github.com/danexpo/mode8/issues.