Repository navigation
Troubleshooting
Each section gives a problem, its cause and the solution.
Cause: The terminal does not send shift+enter or ctrl+enter as separate keys.
Ghostty, Kitty, WezTerm and iTerm2 send them. Terminal.app does not.
Solution: Use one of these:
| Mode | Key |
|---|---|
| All modes |
alt+enter (runs the cell and adds a cell below) |
| Editor, normal mode | space r c |
| Cell mode |
ctrl+e (run), ctrl+n (new cell), r c
|
Cause: In the editor, the vim meaning of a key applies. For example, ctrl+d scrolls there and does not delete the cell.
Solution: Press escape to go to cell mode, then press the key. See What changed for vim.
If you do not want vim keys, type :set novim.
Cause: Terminals send ctrl+h as backspace. Outside insert mode, the two keys go to the window on the left.
Solution: This is the intended function. In insert mode, the two keys delete a character.
Cause: The folder icons are characters of a Nerd Font. The font of your terminal does not have them.
Solution: Use one of these:
- Type
:set noicons. The explorer then shows▸and▾. gpython saves the setting. - Set a Nerd Font as the font of your terminal.
Cause: The terminal has no graphics protocol that gpython can use, or gpython runs in tmux. In tmux, gpython does not use the kitty graphics protocol.
Solution:
- Use a terminal with the kitty graphics protocol: Kitty, Ghostty, Rex, WezTerm or Konsole.
- Run gpython outside tmux.
- Or use
vin cell mode, theno, to open the image in the browser.
To examine what a terminal supports, run uv run python scripts/kitty_probe.py from a source checkout.
Solution: Set GPYTHON_KITTY_IMAGES=0 to use the fallback method:
GPYTHON_KITTY_IMAGES=0 gpython nb.pyCause: The kernel did not start in the selected environment.
Solution:
- Press
f6and select a different environment. - In a uv project, read the message that gpython shows. It contains what uv printed.
- If the environment has no ipykernel, select it in the picker. gpython installs ipykernel.
Cause: gpython shows a message with the cause when it starts. The usual causes are in this table.
| Cause | Solution |
|---|---|
The .venv has no ipykernel |
Press f6 and select the environment. gpython installs ipykernel there |
| The uv project has no environment yet | Run uv sync in the project, or start gpython with --extra or --with
|
| The notebook used a different environment last time | Press f6 and select the project environment |
| You gave uv flags, but the folder is not a uv project | Add a pyproject.toml, or install uv |
See Which environment a notebook starts in.
Cause: The package is in a different environment than the kernel.
Solution: Look at the kernel label in the header. Install into that environment with :pip name
or %uv pip install name. These commands always use the environment of the kernel.
Cause: That Python was built without the module.
Solution: gpython tells you this and does not try to install it. Use a different Python (f6).
Causes and solutions:
| Cause | Solution |
|---|---|
You used a command-line option (--theme, --no-vim). These apply to one session |
Use :theme name or :set novim
|
| The config file has a syntax error. gpython then ignores the full file | Correct ~/.config/gpython/config.toml
|
XDG_CONFIG_HOME is set. gpython reads a different file |
Edit $XDG_CONFIG_HOME/gpython/config.toml
|
Cause: gpython writes the full file again each time it saves a setting. It does not keep comments.
Solution: Keep your notes in a different file.
Cause: A different editor changed the file. The saved cell layout applies only to the exact text that gpython wrote.
Solution: None is necessary. gpython divides the file at top-level statements.
If you want fixed cell borders in the file, use # %% lines. See File formats.
Cause: The gpython command on your PATH is an older installation.
Solution:
- Run
gpython --version. - Update:
uv tool upgrade gpynb. - If you work from a source checkout, install it as editable:
uv tool install --editable .
Cause: Concurrent mode is on and the environment of the kernel has no threadpoolctl.
The math libraries then use too many threads.
Solution: Install it into the environment of the kernel: :pip threadpoolctl.
Cause: The kernel already runs an event loop. Version 0.2.0 and older cannot start a second one.
Versions after 0.2.0 support asyncio.run() in a cell.
Solution: Write await coroutine() at the top level of the cell. This works in all versions.
GPYTHON_TTY_LOG=session.log gpython nb.pygpython writes each byte that it sends to the terminal into the file.
cat session.log plays the session again.
The file contains everything that was on the screen. Examine it before you share it.
Use the notebook
- Getting started
- Command line
- Running cells
- Keys
- Commands
- Vim
- Markdown cells
- Variables and the debugger
- Images
Set up the workspace
Help and project