kovidgoyal/kitty · warning
Could not read from included config file: {}, ignoring
Error message
Could not read from included config file: {}, ignoring What it means
An included config file exists but could not be read (OSError other than not-found: permission denied, I/O error, directory instead of file); kitty skips it and continues.
Source
Thrown at kitty/conf/utils.py:357
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,)
for val in vals:
if memory.seen(val):
continue
try:
with open(val, encoding='utf-8', errors='replace') as include:
with currently_parsing.set_file(val):
_parse(include, parse_conf_item, ans, memory, accumulate_bad_lines, effective_config_lines, allow_geninclude=allow_geninclude)
except FileNotFoundError:
log_error(f'Could not find included config file: {val}, ignoring')
except OSError:
log_error('Could not read from included config file: {}, ignoring'.format(val))
return
if parse_conf_item(key, val, ans):
effective_config_lines(key, line)
else:
log_error(f'Ignoring unknown config key: {key}')
def _parse(
lines: Iterable[str],
parse_conf_item: ItemParser,
ans: dict[str, Any],
memory: Memory,
accumulate_bad_lines: list[BadLine] | None = None,
effective_config_lines: Callable[[str, str], None] | None = None,
allow_geninclude: bool = True,
) -> None:
name = getattr(lines, 'name', None)
effective_config_lines = effective_config_lines or (lambda a, b: None)View on GitHub (pinned to 6d5d0c4406)
Solutions
- Check permissions: `ls -l <file>` and chmod/chown as needed
- Ensure the path is a regular readable file
- For automounted homes, ensure the mount is up before kitty starts
Defensive patterns
Strategy: validation
Validate before calling
import os
p = os.path.expanduser(path)
assert os.path.isfile(p) and os.access(p, os.R_OK), f'unreadable include: {p}' Prevention
- Check file permissions after syncing configs across machines
- Never point include at a directory
When it happens
Trigger: open() succeeds-or-fails with EACCES/EISDIR etc. — e.g. include of a directory, unreadable permissions, or dcache/automount hiccup.
Common situations: chmod 600 root-owned shared configs; including a directory path by mistake; network filesystems failing the read.
Related errors
- Failed to create config directory to store favorites in: %w
- Too many nested include directives while processing config f
- Empty include paths not allowed
- Could not find included config file: {val}, ignoring
- The PNG image: %s could not be opened with error: %s
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/c25ea778bbe06128.
Report an issue: GitHub.