{"record":{"id":"30242ba7a61d3298","repo":"crewAIInc/crewAI","slug":"firecrawl-py-package-not-found-please-run-uv-a","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_crawl_website_tool/firecrawl_crawl_website_tool.py","lineNumber":103,"sourceCode":"\n            self._firecrawl = FirecrawlApp(api_key=self.api_key)\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                try:\n                    subprocess.run([\"uv\", \"add\", \"firecrawl-py\"], check=True)  # noqa: S607\n                    from firecrawl import FirecrawlApp\n\n                    self._firecrawl = FirecrawlApp(api_key=self.api_key)\n                except subprocess.CalledProcessError as e:\n                    raise ImportError(\"Failed to install firecrawl-py package\") from e\n            else:\n                raise ImportError(\n                    \"`firecrawl-py` package not found, please run `uv add firecrawl-py`\"\n                ) from None\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.crawl(url=url, poll_interval=2, **self.config)\n\n\ntry:\n    from firecrawl import FirecrawlApp  # noqa: F401\n\n    if not getattr(FirecrawlCrawlWebsiteTool, \"_model_rebuilt\", False):\n        FirecrawlCrawlWebsiteTool.model_rebuild()\n        FirecrawlCrawlWebsiteTool._model_rebuilt = True  # type: ignore[attr-defined]\nexcept ImportError:","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/firecrawl_crawl_website_tool/firecrawl_crawl_website_tool.py#L85-L121","documentation":"Raised by FirecrawlCrawlWebsiteTool.__init__ when the 'firecrawl-py' package is missing and the user declined the interactive install prompt. It is the explicit opt-out branch: the tool will not proceed without the package, and it tells you the exact command to install it.","triggerScenarios":"Instantiating the tool without firecrawl-py installed and answering 'n' to the confirm prompt; non-interactive contexts where the confirm declines/aborts.","commonSituations":"CI/CD and Docker builds that hit the prompt without a TTY; scripted deployments where interactive confirmation is impossible; users intentionally declining auto-install out of caution.","solutions":["Install the package yourself: uv add firecrawl-py (or pip install firecrawl-py).","Pre-install it in your Dockerfile/CI step so the prompt never appears.","Pin it in pyproject.toml/requirements so all environments include it."],"exampleFix":"# before: prompt declined -> ImportError\n# after: shell\n#   pip install firecrawl-py\ntool = FirecrawlCrawlWebsiteTool(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 = FirecrawlCrawlWebsiteTool(api_key=KEY)\nexcept ImportError as e:\n    if 'firecrawl-py' in str(e):\n        raise SystemExit('pre-install firecrawl-py; prompts do not work non-interactively') from e\n    raise","preventionTips":["Pre-install optional tool deps in Dockerfiles/CI steps.","Avoid interactive install prompts in any automated environment."],"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"}