{"record":{"id":"18616f657e288da1","repo":"ScrapeGraphAI/Scrapegraph-ai","slug":"module-name-r-has-no-attribute-name-r","errorCode":null,"errorMessage":"module {__name__!r} has no attribute {name!r}","messagePattern":"module (.+?) has no attribute (.+?)","errorType":"exception","errorClass":"AttributeError","httpStatus":null,"severity":"error","filePath":"scrapegraphai/docloaders/__init__.py","lineNumber":22,"sourceCode":"Note: ChromiumLoader and PlasmateLoader are lazy-imported to avoid triggering\ntorchcodec/FFmpeg DLL loading at import time (sentence_transformers -> torchcodec chain).\n\"\"\"\n\nfrom .browser_base import browser_base_fetch\nfrom .scrape_do import scrape_do_fetch\n\n_LAZY_MODULES = {\n    \"ChromiumLoader\": \".chromium\",\n    \"PlasmateLoader\": \".plasmate\",\n}\n\n\ndef __getattr__(name):\n    if name in _LAZY_MODULES:\n        import importlib\n        module = importlib.import_module(_LAZY_MODULES[name], __package__)\n        return getattr(module, name)\n    raise AttributeError(f\"module {__name__!r} has no attribute {name!r}\")\n\n\n__all__ = [\n    \"browser_base_fetch\",\n    \"ChromiumLoader\",\n    \"PlasmateLoader\",\n    \"scrape_do_fetch\",\n]\n","sourceCodeStart":4,"sourceCodeEnd":31,"githubUrl":"https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/532dfffbf6ee823a6c9cf8cfedc24a93bf026780/scrapegraphai/docloaders/__init__.py#L4-L31","documentation":"RAGNode lazily imports qdrant_client at execution time and re-raises ImportError with this message when the package is absent. Qdrant is an optional dependency used to store and search document embeddings, so it is not installed with the core library.","triggerScenarios":"Building any graph that includes RAGNode (e.g. RAGSearchGraph) in an environment where qdrant-client is not installed; a fresh venv or Docker image that only installed scrapegraphai's base extras.","commonSituations":"CI pipelines or slim Docker images missing optional dependencies; adding RAG features to an existing project without updating requirements; dependency pruning tools removing 'unused' optional packages.","solutions":["Install the client: pip install qdrant-client (or uv add qdrant-client).","Add qdrant-client to your project's dependency list so environments are reproducible.","If you never need RAG, remove RAGNode from the graph instead of installing the package."],"exampleFix":"# before: RAGSearchGraph run fails with ImportError\n\n# after (shell)\n# pip install qdrant-client","handlingStrategy":"validation","validationCode":"try:\n    import qdrant_client  # noqa: F401\nexcept ImportError:\n    raise SystemExit(\"Install optional dependency: pip install qdrant-client\")","typeGuard":"null","tryCatchPattern":"try:\n    result = rag_graph.run()\nexcept ImportError as e:\n    if \"qdrant_client\" in str(e):\n        subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"qdrant-client\"])  # or surface a clear message","preventionTips":["Declare qdrant-client in your requirements when using RAG graphs.","In Docker/CI, install optional extras needed by the graphs you actually run."],"tags":["dependencies","qdrant","rag","import-error"],"backgroundTag":"missing-dependency","analyzedSha":"532dfffbf6ee823a6c9cf8cfedc24a93bf026780","analyzedAt":"2026-08-28T15:19:38.821Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}