{"record":{"id":"db4967f73f2f987f","repo":"opendataloader-project/opendataloader-pdf","slug":"missing-dependencies-join-missing-instal","errorCode":null,"errorMessage":"Missing dependencies: {', '.join(missing)}. Install with: pip install opendataloader-pdf[hybrid]","messagePattern":"Missing dependencies: (.+?)\\. Install with: pip install opendataloader-pdf\\[hybrid\\]","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"python/opendataloader-pdf/src/opendataloader_pdf/hybrid_server.py","lineNumber":301,"sourceCode":"\ndef _check_dependencies():\n    \"\"\"Check if hybrid dependencies are installed.\"\"\"\n    missing = []\n    try:\n        import uvicorn  # noqa: F401\n    except ImportError:\n        missing.append(\"uvicorn\")\n    try:\n        import fastapi  # noqa: F401\n    except ImportError:\n        missing.append(\"fastapi\")\n    try:\n        import docling  # noqa: F401\n    except ImportError:\n        missing.append(\"docling\")\n\n    if missing:\n        raise ImportError(\n            f\"Missing dependencies: {', '.join(missing)}. \"\n            \"Install with: pip install opendataloader-pdf[hybrid]\"\n        )\n\n\ndef _check_ocr_engine_available(engine_kind: str) -> tuple[bool, str]:\n    \"\"\"Probe runtime prerequisites for the selected OCR engine.\n\n    Called at startup so a missing binary or Python package surfaces before the\n    first request rather than mid-conversion. Returns (ok, error_message).\n\n    `easyocr` ships with the `[hybrid]` extra and `auto` defers engine choice to\n    docling at conversion time, so both are treated as always available. Other\n    engines pull in extra system or Python dependencies that are not declared\n    in pyproject and must be installed by the user.\n    \"\"\"\n    import importlib.util\n    import shutil","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/opendataloader-project/opendataloader-pdf/blob/a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8/python/opendataloader-pdf/src/opendataloader_pdf/hybrid_server.py#L283-L319","documentation":"ImportError raised by _check_dependencies at hybrid server startup when one or more of uvicorn, fastapi, or docling cannot be imported. These are optional dependencies declared under the [hybrid] extra, not in the base install, so the server refuses to start (rather than failing later on the first request) and names the missing packages plus the install command.","triggerScenarios":"Starting the hybrid server (python -m opendataloader_pdf.hybrid_server or its CLI) in an environment where opendataloader-pdf was installed WITHOUT the [hybrid] extra, so uvicorn/fastapi/docling are absent.","commonSituations":"User ran pip install opendataloader-pdf (base) then tried to launch the hybrid backend. A venv was created from a constraints file that omitted the hybrid deps. A dependency resolver downgraded/removed a transitive package.","solutions":["Install the hybrid extra: pip install 'opendataloader-pdf[hybrid]'.","If only some packages are missing, install them directly: pip install uvicorn fastapi docling (or the subset named in the message).","Recreate the venv from the project's lockfile/constraints that include the hybrid extras.","Verify with python -c 'import uvicorn, fastapi, docling' before starting the server."],"exampleFix":"# before: base install, hybrid deps missing\n$ pip install opendataloader-pdf\n$ python -m opendataloader_pdf.hybrid_server  # -> ImportError: Missing dependencies: uvicorn, fastapi, docling\n# after: install the extra\n$ pip install 'opendataloader-pdf[hybrid]'","handlingStrategy":"validation","validationCode":"def hybrid_deps_ok() -> bool:\n    import importlib.util\n    return all(importlib.util.find_spec(m) is not None for m in (\"uvicorn\", \"fastapi\", \"docling\"))\n","typeGuard":"def is_missing_hybrid_deps(exc: ImportError) -> bool:\n    return isinstance(exc, ImportError) and \"Missing dependencies\" in str(exc)","tryCatchPattern":"try:\n    from opendataloader_pdf.hybrid_server import main\n    main()\nexcept ImportError as e:\n    if \"Missing dependencies\" in str(e):\n        print(\"Install the extra: pip install 'opendataloader-pdf[hybrid]'\")\n    raise","preventionTips":["Install with the extra: pip install 'opendataloader-pdf[hybrid]'.","Pin the hybrid extras in your lockfile/constraints.","Verify with python -c 'import uvicorn, fastapi, docling' before starting the server."],"tags":["hybrid","dependencies","install","importerror","python"],"backgroundTag":null,"analyzedSha":"a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8","analyzedAt":"2026-08-14T05:22:03.953Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}