{"record":{"id":"cc384925ae65a2de","repo":"crewAIInc/crewAI","slug":"firecrawl-py-package-not-found-please-run-uv-a-cc3849","errorCode":null,"errorMessage":"`firecrawl-py` package not found, please run `uv add firecrawl-py`","messagePattern":"`firecrawl-py` package not found, please run `uv add firecrawl-py`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/firecrawl_scrape_website_tool/firecrawl_scrape_website_tool.py","lineNumber":101,"sourceCode":"\n    def __init__(self, api_key: str | None = None, **kwargs: Any) -> None:\n        super().__init__(**kwargs)\n        try:\n            from firecrawl import FirecrawlApp\n        except ImportError:\n            import click\n\n            if click.confirm(\n                \"You are missing the 'firecrawl-py' package. Would you like to install it?\"\n            ):\n                import subprocess\n\n                subprocess.run([\"uv\", \"add\", \"firecrawl-py\"], check=True)  # noqa: S607\n                from firecrawl import (\n                    FirecrawlApp,\n                )\n            else:\n                raise ImportError(\n                    \"`firecrawl-py` package not found, please run `uv add firecrawl-py`\"\n                ) from None\n\n        self._firecrawl = FirecrawlApp(api_key=api_key)\n\n    def _run(self, url: str) -> Any:\n        if not self._firecrawl:\n            raise RuntimeError(\"FirecrawlApp not properly initialized\")\n\n        url = validate_url(url)\n        return self._firecrawl.scrape(url=url, **self.config)\n\n\ntry:\n    from firecrawl import FirecrawlApp  # noqa: F401\n\n    if not getattr(FirecrawlScrapeWebsiteTool, \"_model_rebuilt\", False):\n        FirecrawlScrapeWebsiteTool.model_rebuild()","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/firecrawl_scrape_website_tool/firecrawl_scrape_website_tool.py#L83-L119","documentation":"Raised by FirecrawlScrapeWebsiteTool.__init__ when the 'firecrawl-py' package is missing and the user declined the interactive 'uv add firecrawl-py' prompt. Same opt-out pattern as the other Firecrawl tools: without the package the client cannot be built, so construction aborts with the install command in the message.","triggerScenarios":"Instantiating FirecrawlScrapeWebsiteTool in an environment lacking firecrawl-py and answering 'n' to the confirm; non-interactive shells where the prompt cannot be answered.","commonSituations":"CI and containerized builds without the optional dep; fresh clones; automated deployment scripts that must not prompt.","solutions":["Install it: pip install firecrawl-py (or uv add firecrawl-py).","Add it to project dependencies so every environment has it.","Pre-install in Docker/CI to avoid the interactive prompt entirely."],"exampleFix":"# before: prompt declined -> ImportError\n# after: shell\n#   pip install firecrawl-py\ntool = FirecrawlScrapeWebsiteTool(api_key=FIRECRAWL_API_KEY)","handlingStrategy":"try-catch","validationCode":"try:\n    import firecrawl  # noqa: F401\nexcept ImportError:\n    raise SystemExit('firecrawl-py required: pip install firecrawl-py')","typeGuard":null,"tryCatchPattern":"try:\n    tool = FirecrawlScrapeWebsiteTool(api_key=KEY)\nexcept ImportError:\n    raise SystemExit('pre-install firecrawl-py before instantiating scrape tool')","preventionTips":["Install firecrawl-py up front in every environment that builds this tool.","Script non-interactive installs; never depend on the click.confirm path."],"tags":["firecrawl","import-error","dependency","interactive-prompt","optional-deps"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}