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
- Use an absolute path for the geninclude program
- 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
- Use absolute paths in geninclude
- Keep generator scripts under ~/.config/kitty and version them
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
- No custom kitten named {kitten} found
- Ignoring geninclude directive for security
- Could not find included config file: {val}, ignoring
- The PNG image: %s could not be opened with error: %s
- This should be run as kitten broadcast
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/6cbf95496d11a0b8.
Report an issue: GitHub.