{"record":{"id":"c25ea778bbe06128","repo":"kovidgoyal/kitty","slug":"could-not-read-from-included-config-file-igno","errorCode":null,"errorMessage":"Could not read from included config file: {}, ignoring","messagePattern":"Could not read from included config file: (.+?), ignoring","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/conf/utils.py","lineNumber":357,"sourceCode":"                            effective_config_lines,\n                            allow_geninclude=allow_geninclude,\n                        )\n            return\n        else:\n            if not os.path.isabs(val):\n                val = os.path.join(base_path_for_includes, val)\n            vals = (val,)\n        for val in vals:\n            if memory.seen(val):\n                continue\n            try:\n                with open(val, encoding='utf-8', errors='replace') as include:\n                    with currently_parsing.set_file(val):\n                        _parse(include, parse_conf_item, ans, memory, accumulate_bad_lines, effective_config_lines, allow_geninclude=allow_geninclude)\n            except FileNotFoundError:\n                log_error(f'Could not find included config file: {val}, ignoring')\n            except OSError:\n                log_error('Could not read from included config file: {}, ignoring'.format(val))\n        return\n    if parse_conf_item(key, val, ans):\n        effective_config_lines(key, line)\n    else:\n        log_error(f'Ignoring unknown config key: {key}')\n\n\ndef _parse(\n    lines: Iterable[str],\n    parse_conf_item: ItemParser,\n    ans: dict[str, Any],\n    memory: Memory,\n    accumulate_bad_lines: list[BadLine] | None = None,\n    effective_config_lines: Callable[[str, str], None] | None = None,\n    allow_geninclude: bool = True,\n) -> None:\n    name = getattr(lines, 'name', None)\n    effective_config_lines = effective_config_lines or (lambda a, b: None)","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/conf/utils.py#L339-L375","documentation":"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.","triggerScenarios":"open() succeeds-or-fails with EACCES/EISDIR etc. — e.g. include of a directory, unreadable permissions, or dcache/automount hiccup.","commonSituations":"chmod 600 root-owned shared configs; including a directory path by mistake; network filesystems failing the read.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import os\np = os.path.expanduser(path)\nassert os.path.isfile(p) and os.access(p, os.R_OK), f'unreadable include: {p}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check file permissions after syncing configs across machines","Never point include at a directory"],"tags":["kitty","config","include","permissions","io"],"backgroundTag":"config-include-file-unreadable","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}