mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Do not reraise exception
Tool use is optional and missing dependency should not raise error
This commit is contained in:
@@ -65,8 +65,10 @@ class FirecrawlScrapeWebsiteTool(BaseTool):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from firecrawl import FirecrawlApp
|
from firecrawl import FirecrawlApp
|
||||||
|
# Must rebuild model after class is defined
|
||||||
FirecrawlScrapeWebsiteTool.model_rebuild()
|
FirecrawlScrapeWebsiteTool.model_rebuild()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError(
|
"""
|
||||||
"`firecrawl` package not found, please run `pip install firecrawl-py`"
|
When this tool is not used, then exception can be ignored.
|
||||||
)
|
"""
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user