{"record":{"id":"6cbf95496d11a0b8","repo":"kovidgoyal/kitty","slug":"could-not-find-the-geninclude-file-val-ignorin","errorCode":null,"errorMessage":"Could not find the geninclude file: {val}, ignoring","messagePattern":"Could not find the geninclude file: (.+?), ignoring","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/conf/utils.py","lineNumber":328,"sourceCode":"                            ans,\n                            memory,\n                            accumulate_bad_lines,\n                            effective_config_lines,\n                            allow_geninclude=allow_geninclude,\n                        )\n            return\n        elif key == 'geninclude':\n            if not allow_geninclude:\n                log_error('Ignoring geninclude directive for security')\n                return\n            if not os.path.isabs(val):\n                val = os.path.join(base_path_for_includes, val)\n            if not memory.seen(val):\n                try:\n                    lines = geninclude(val)\n                except FileNotFoundError as e:\n                    if e.filename == val:\n                        log_error(f'Could not find the geninclude file: {val}, ignoring')\n                    else:\n                        raise\n                else:\n                    with currently_parsing.set_file(f'<get: {val}>'):\n                        _parse(\n                            NamedLineIterator(os.path.join(base_path_for_includes, ''), iter(lines)),\n                            parse_conf_item,\n                            ans,\n                            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,)","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/conf/utils.py#L310-L346","documentation":"The program run for a `geninclude` directive was not found (FileNotFoundError whose filename equals the directive value); kitty ignores the directive.","triggerScenarios":"geninclude pointing at a program that does not exist at the given path, or a relative path not resolvable from kitty's cwd.","commonSituations":"Script moved/renamed; relative path relying on cwd that differs when kitty launches from a desktop entry.","solutions":["Use an absolute path for the geninclude program","Verify the program exists and is executable"],"exampleFix":"# before\ngeninclude genconf.py\n# after\ngeninclude /home/user/.config/kitty/genconf.py","handlingStrategy":"validation","validationCode":"import os\nassert os.path.isfile(prog) and os.access(prog, os.X_OK), 'geninclude program missing'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute paths in geninclude","Keep generator scripts under ~/.config/kitty and version them"],"tags":["kitty","config","geninclude","file-not-found"],"backgroundTag":"config-script-not-found","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}