{"record":{"id":"3369be85cba6ed80","repo":"browser-use/browser-use","slug":"ancestor-is-not-a-directory","errorCode":null,"errorMessage":"{ancestor} is not a directory.","messagePattern":"(.+?) is not a directory\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"browser_use/skills/install.py","lineNumber":147,"sourceCode":"\t\treturn [TARGET_DIR_BUILDERS[target]() / 'SKILL.md']\n\n\tpath = custom_path.expanduser()\n\tif path.name == 'SKILL.md':\n\t\treturn [path]\n\treturn [path / 'SKILL.md']\n\n\ndef _validate_output_paths(output_paths: list[Path]) -> None:\n\tfor output_path in output_paths:\n\t\tif output_path.exists() and output_path.is_dir():\n\t\t\traise RuntimeError(f'{output_path} is a directory, expected a SKILL.md file path.')\n\t\tancestor = output_path.parent\n\t\twhile not ancestor.exists():\n\t\t\tif ancestor.parent == ancestor:\n\t\t\t\tbreak\n\t\t\tancestor = ancestor.parent\n\t\tif ancestor.exists() and not ancestor.is_dir():\n\t\t\traise RuntimeError(f'{ancestor} is not a directory.')\n\n\ndef handle(argv: list[str]) -> int:\n\tparser = _build_parser()\n\targs = parser.parse_args(argv)\n\n\tcommand = args.command or 'show'\n\n\tif command == 'show':\n\t\ttry:\n\t\t\ttext = _load_skill_text_from_browser_harness_cli()\n\t\texcept RuntimeError as exc:\n\t\t\tprint(f'Error: {exc}', file=sys.stderr)\n\t\t\treturn 1\n\t\tprint(text, end='')\n\t\treturn 0\n\n\tif command == 'install':","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/browser-use/browser-use/blob/6c73fced2f6d45a11d88622fe56365a5fe18f28b/browser_use/skills/install.py#L129-L165","documentation":"Error \"{ancestor} is not a directory.\" thrown in browser-use/browser-use.","triggerScenarios":"An ancestor component of the skill output path exists but is a file, not a directory.","commonSituations":"A file shadows a directory name in the target skills path.","solutions":["Ensure the output path's parent directory exists and is a directory."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c73fced2f6d45a11d88622fe56365a5fe18f28b","analyzedAt":"2026-08-14T19:42:40.557Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}