[PR #24030] [CLOSED] fix: add missing import requests in SafeFireCrawlLoader #66342

Closed
opened 2026-05-06 12:39:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/24030
Author: @Jah-yee
Created: 4/23/2026
Status: Closed

Base: mainHead: fix/safefirecrawl-import-requests


📝 Commits (1)

  • 26b51ce fix: add missing import requests in SafeFireCrawlLoader

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 backend/open_webui/retrieval/web/utils.py (+1 -0)

📄 Description

Good day

Bug Description

In backend/open_webui/retrieval/web/utils.py, the SafeFireCrawlLoader.lazy_load() method calls requests.post() on line 233, but the requests module is never imported. This causes a NameError: name 'requests' is not defined at runtime.

Root Cause

The requests library is used for making HTTP calls to the Firecrawl API endpoint ({self.api_url}/v1/scrape), but the import statement is missing from the module-level imports.

Fix Applied

Added import requests alongside the other third-party imports (after import validators).

Verification

The fix can be verified by:

  1. Importing the SafeFireCrawlLoader class
  2. Instantiating it with valid API credentials
  3. Calling the lazy_load() method — it should no longer raise NameError

Thank you for your work on this project. I hope this small fix is helpful. Please let me know if there's anything to adjust.

Warmly,
RoomWithOutRoof


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/24030 **Author:** [@Jah-yee](https://github.com/Jah-yee) **Created:** 4/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/safefirecrawl-import-requests` --- ### 📝 Commits (1) - [`26b51ce`](https://github.com/open-webui/open-webui/commit/26b51ceb778ab6442feaa7f2a9af56ca276e65af) fix: add missing import requests in SafeFireCrawlLoader ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/retrieval/web/utils.py` (+1 -0) </details> ### 📄 Description Good day ## Bug Description In `backend/open_webui/retrieval/web/utils.py`, the `SafeFireCrawlLoader.lazy_load()` method calls `requests.post()` on line 233, but the `requests` module is never imported. This causes a `NameError: name 'requests' is not defined` at runtime. ## Root Cause The `requests` library is used for making HTTP calls to the Firecrawl API endpoint (`{self.api_url}/v1/scrape`), but the import statement is missing from the module-level imports. ## Fix Applied Added `import requests` alongside the other third-party imports (after `import validators`). ## Verification The fix can be verified by: 1. Importing the `SafeFireCrawlLoader` class 2. Instantiating it with valid API credentials 3. Calling the `lazy_load()` method — it should no longer raise `NameError` Thank you for your work on this project. I hope this small fix is helpful. Please let me know if there's anything to adjust. Warmly, RoomWithOutRoof --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 12:39:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#66342