Skip to content
Latchkey

treon notebook test failure (execution failed) in CI

treon is a lightweight test runner that executes every notebook it finds and passes only if all cells run without raising. A FAILED result means a cell threw during execution, the same way the notebook would fail if you ran it top to bottom.

What this error means

treon prints a results table with one or more notebooks marked "FAILED" and exits non-zero, reporting the cell or error that stopped execution.

treon
-----------------------------------------------------------------
 Notebook                              | Execution | Result
-----------------------------------------------------------------
 notebooks/analysis.ipynb              |    PASS   |  FAIL
-----------------------------------------------------------------
treon: 1 of 1 notebooks FAILED

Common causes

A cell raised during the full run

treon runs the notebook end to end; a missing file, an import error, or a code bug in any cell fails the notebook.

Missing kernel or dependencies for execution

Without ipykernel or the notebook's dependencies installed, treon cannot execute the cells and reports failure.

How to fix it

Reproduce the run and read the failing cell

  1. Install the notebook's dependencies and ipykernel.
  2. Run treon on the single notebook to see the failing cell and traceback.
  3. Fix the code, data, or environment the cell needs.
Terminal
python -m pip install treon ipykernel
treon notebooks/analysis.ipynb

Raise the per-cell timeout for slow notebooks

treon uses nbconvert under the hood; pass a larger timeout when cells legitimately take longer on CI.

Terminal
treon --threads 2 notebooks/

How to prevent it

  • Install ipykernel and notebook dependencies before running treon.
  • Run notebooks top to bottom locally before pushing.
  • Keep test notebooks fast and self-contained for CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →