{"record":{"id":"dc1e8ff604a35021","repo":"kovidgoyal/kitty","slug":"could-not-find-included-config-file-val-ignori","errorCode":null,"errorMessage":"Could not find included config file: {val}, ignoring","messagePattern":"Could not find included config file: (.+?), ignoring","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/conf/utils.py","lineNumber":355,"sourceCode":"                            memory,\n                            accumulate_bad_lines,\n                            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:","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/conf/utils.py#L337-L373","documentation":"An `include` directive referenced a config file that does not exist; kitty logs and continues parsing.","triggerScenarios":"open(val) raises FileNotFoundError for an included file path (after ~ and env expansion).","commonSituations":"Typos in include paths, referencing theme files not yet installed, moving configs between machines where a shared file is absent.","solutions":["Fix the path or create the file","Use globinclude if the file is optional (globs that match nothing are skipped silently)"],"exampleFix":"# before\ninclude themes/mytheme.conf   # file absent\n# after\ninclude current-theme.conf    # or create the file","handlingStrategy":"validation","validationCode":"import os\nfor inc in includes:\n    if not os.path.isfile(os.path.expanduser(inc)):\n        print(f'warning: missing include {inc}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run kitty --debug-config to catch missing includes early","Use globinclude for optional files"],"tags":["kitty","config","include","file-not-found"],"backgroundTag":"config-include-file-not-found","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}