Bug: FireCrawlLoader - Got exception due to failed crawl job but it was indeed a success #27063
Open
5 tasks done
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Checked other resources
Example Code
I have set environment variable for FIRECRAWL_API_KEY
Error Message and Stack Trace (if applicable)
Traceback (most recent call last):
File "/home/thoa/Documents/dev/demos/firecrawl/chat-with-website.py", line 23, in
for doc in docs_lazy:
File "/home/thoa/.local/lib/python3.10/site-packages/langchain_community/document_loaders/firecrawl.py", line 112, in lazy_load
firecrawl_docs = self.firecrawl.crawl_url(self.url, params=self.params)
File "/home/thoa/.local/lib/python3.10/site-packages/firecrawl/firecrawl.py", line 133, in crawl_url
return self._monitor_job_status(id, headers, poll_interval)
File "/home/thoa/.local/lib/python3.10/site-packages/firecrawl/firecrawl.py", line 360, in _monitor_job_status
raise Exception(f'Crawl job failed or was stopped. Status: {status_data["status"]}')
Exception: Crawl job failed or was stopped. Status: failed
Description
I'm trying to use FireCrawlLoader to crawl a website. I should get a printed out put like:
Instead, I got an error that the crawl job failed or was stopped but I checked the Activity Logs in FireCrawl and the craw was a success.
The error can be traced to the function monitor_job_status in FireCrawl's Python SDK. I'm not sure if there is bug in FireCrawl integration in Langchain, or FireCrawl's Python SDK.
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: