Skip to content

Troubleshooting

rafageist edited this page Dec 4, 2026 · 3 revisions

Troubleshooting

Alt+F (or Alt+1) does nothing, or types a character

Your terminal sends Alt+F as Esc and f. DesktopApp fixes that; an application that does not use it calls turboframe.ui.compat.fix_alt_keys() before its App starts. If the terminal still sends nothing, its Alt key is set to type characters. In GNOME Terminal, Konsole and Windows Terminal, Alt sends Esc by default. On macOS, enable "Use Option as Meta key".

F10 always opens the menu; the status line's items work by click as well.

Frames or text are shifted on a line

A character in that line is drawn two cells wide, or not at all, by your terminal's font. Keep your application's own strings to ASCII and CP437 (see Glyphs) and pass foreign text through screen_text. A font without the box-drawing characters shows them badly: use a monospace font made for terminals.

The colours are wrong, or only 16

The terminal says it can show fewer colours than it can, which is common over SSH and in tmux: set Options > Colors > Colour depth to true colour, or start with colors="truecolor". In tmux, also set default-terminal to tmux-256color and add the RGB feature for your terminal.

A key shown in a menu does nothing

A menu item's key text ("F3", "Ctrl+P") is only shown, and works only while that menu is open. Bind the key with Textual's BINDINGS to an action that posts the command (see Application Mixins). A status line item's key works by itself.

The language server never starts

LspMixin sends an editor to a server only when the editor's language is in its SMART_LANGUAGES, the file is saved somewhere (not untitled), one of LSP_SERVERS has that language, and its command is found (see The Editor). The status line's lsp_status() says which of these is missing. Install the lsp extra too.

A dialog ignores the first keys in a test

Keys pressed before the dialog's focused control is mounted are lost. Wait for dialog_ready(app) first (see Testing).

My on_mount or on_command_message runs twice, or my subclass's does not replace it

Textual calls these handlers on every class of the hierarchy, the subclass's first, until one calls message.prevent_default(). Define them once and dispatch to methods you override. The tutorial's start() and handle() show the pattern (Your First Application).

app.query(...) fails with "str object is not callable", or "property 'name' has no setter"

An attribute of your application, a window or a dialog has the name of a Textual method or property: query, screen, title, log, name... Rename it (project_name).

CancelledError when starting a process

The application is closing: nothing starts once it does (see Processes). In tests, an application that opens on a loop where another one closed calls process.opening(); DesktopApp does it for you.

A process outlives the application

Start it with process.start() (or process.run()), not asyncio.create_subprocess_exec directly: only tracked processes are killed. A tracked process can still survive a kill on Windows (see Platforms). The real-terminal test plugin finds them: see no_process_left in Testing.

The browser says "Forbidden", "opened already" or "Misdirected request"

The web mode's address opens once, within 10 minutes, and then only in the browser that opened it; a different host name or port than the one served is refused. The Web Mode page has a table of every message and what to do.

TurboFrame's dialogs are in English though my application is in Spanish

Call turboframe.i18n.use(language) when your application chooses its language (Languages). In a binary, keep TurboFrame's data files (Packaging).

Something else

Open an issue at divengine/turboframe with your terminal, platform, Python version and the steps.

Clone this wiki locally