{"record":{"id":"2c82e77c0f54684b","repo":"HKUDS/DeepTutor","slug":"configured-mineru-cli-path-is-not-an-executable-fi","errorCode":null,"errorMessage":"Configured MinerU CLI path is not an executable file: {probe['path']}. Fix it in Settings → MinerU (or clear it to auto-detect from PATH).","messagePattern":"Configured MinerU CLI path is not an executable file: (.+?)\\. Fix it in Settings → MinerU \\(or clear it to auto-detect from PATH\\)\\.","errorType":"exception","errorClass":"MinerUError","httpStatus":null,"severity":"error","filePath":"deeptutor/services/parsing/engines/mineru/backend.py","lineNumber":133,"sourceCode":"\n\ndef _parse_local(\n    pdf_path: Path,\n    output_base: Path,\n    *,\n    config: MinerUConfig,\n    on_output: Callable[[str], None] | None = None,\n) -> Path:\n    \"\"\"Local-CLI branch: delegate to the existing subprocess parser and return\n    the deterministic output directory it writes to (``<base>/<stem>``).\"\"\"\n    from .local import parse_pdf_with_mineru\n    from .models import model_env_overrides, render_env_overrides\n\n    cli_command = None\n    if (config.local_cli_path or \"\").strip():\n        probe = local_cli_probe(config.local_cli_path)\n        if not probe[\"found\"]:\n            raise MinerUError(\n                f\"Configured MinerU CLI path is not an executable file: {probe['path']}. \"\n                \"Fix it in Settings → MinerU (or clear it to auto-detect from PATH).\"\n            )\n        cli_command = probe[\"path\"]\n\n    # A lazy first-parse model download must honor the configured source and\n    # custom address, not just the explicit Download button.\n    download_env = model_env_overrides(config.model_download_source, config.model_download_endpoint)\n    # Only the local CLI renders pages in this process tree; cloud mode never\n    # does, so the Windows render-thread guard belongs on this branch alone.\n    subprocess_env = {**download_env, **render_env_overrides()}\n\n    logger.info(\"Parsing %s via local MinerU CLI (%s)\", pdf_path.name, cli_command or \"PATH\")\n    ok = parse_pdf_with_mineru(\n        str(pdf_path),\n        str(output_base),\n        on_output=on_output,\n        cli_command=cli_command,","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/services/parsing/engines/mineru/backend.py#L115-L151","documentation":"User configured an explicit MinerU CLI path in Settings, but the probe found it is not an existing executable file. The backend refuses to run rather than invoking a broken command.","triggerScenarios":"config.local_cli_path is a non-empty string that local_cli_probe() cannot resolve to an executable file — wrong path, missing file, or no execute permission.","commonSituations":"Typo in the path, path from another machine/container, CLI uninstalled, or a non-executable script (chmod -x).","solutions":["Fix or clear local_cli_path in Settings → MinerU so auto-detection from PATH takes over.","Verify with: ls -l /path/to/mineru && /path/to/mineru --version.","If correct, chmod +x the CLI.","Confirm the venv where mineru is installed is the one the app runs in."],"exampleFix":"# before\nconfig.local_cli_path = \"/usr/local/bin/mineru\"  # stale\n\n# after\nconfig.local_cli_path = \"\"  # auto-detect from PATH","handlingStrategy":"validation","validationCode":"import os, stat\n\ndef cli_ok(path: str) -> bool:\n    if not (path or \"\").strip():\n        return True  # auto-detect\n    st = os.stat(path)\n    return stat.S_ISREG(st.st_mode) and bool(st.st_mode & 0o111)","typeGuard":null,"tryCatchPattern":"try:\n    parse_pdf_to_workdir(...)\nexcept MinerUError as e:\n    if \"not an executable\" in str(e):\n        fix_cli_setting()","preventionTips":["Clear local_cli_path to use PATH auto-detection by default.","After moving/removing a venv, update the saved CLI path.","Smoke-test the CLI path at settings-save time."],"tags":["mineru","pdf","configuration","cli-path"],"backgroundTag":"invalid-executable-path","analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}