kovidgoyal/kitty · warning

Could not find the geninclude file: {val}, ignoring

Error message

Could not find the geninclude file: {val}, ignoring

What it means

The program run for a `geninclude` directive was not found (FileNotFoundError whose filename equals the directive value); kitty ignores the directive.

Source

Thrown at kitty/conf/utils.py:328

                            ans,
                            memory,
                            accumulate_bad_lines,
                            effective_config_lines,
                            allow_geninclude=allow_geninclude,
                        )
            return
        elif key == 'geninclude':
            if not allow_geninclude:
                log_error('Ignoring geninclude directive for security')
                return
            if not os.path.isabs(val):
                val = os.path.join(base_path_for_includes, val)
            if not memory.seen(val):
                try:
                    lines = geninclude(val)
                except FileNotFoundError as e:
                    if e.filename == val:
                        log_error(f'Could not find the geninclude file: {val}, ignoring')
                    else:
                        raise
                else:
                    with currently_parsing.set_file(f'<get: {val}>'):
                        _parse(
                            NamedLineIterator(os.path.join(base_path_for_includes, ''), iter(lines)),
                            parse_conf_item,
                            ans,
                            memory,
                            accumulate_bad_lines,
                            effective_config_lines,
                            allow_geninclude=allow_geninclude,
                        )
            return
        else:
            if not os.path.isabs(val):
                val = os.path.join(base_path_for_includes, val)
            vals = (val,)

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Use an absolute path for the geninclude program
  2. Verify the program exists and is executable

Example fix

# before
geninclude genconf.py
# after
geninclude /home/user/.config/kitty/genconf.py
Defensive patterns

Strategy: validation

Validate before calling

import os
assert os.path.isfile(prog) and os.access(prog, os.X_OK), 'geninclude program missing'

Prevention

When it happens

Trigger: geninclude pointing at a program that does not exist at the given path, or a relative path not resolvable from kitty's cwd.

Common situations: Script moved/renamed; relative path relying on cwd that differs when kitty launches from a desktop entry.

Related errors


AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27). Data as JSON: /api/errors/6cbf95496d11a0b8. Report an issue: GitHub.