[PR #24600] [CLOSED] fix: remove duplicate allow_redirects in SafeWebBaseLoader._fetch #115047

Closed
opened 2026-05-18 15:58:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/24600
Author: @EvanYao826
Created: 5/12/2026
Status: Closed

Base: mainHead: fix/safe-web-loader-duplicate-allow-redirects


📝 Commits (1)

  • 9176b6c fix: remove duplicate allow_redirects kwarg in SafeWebBaseLoader._fetch

📊 Changes

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

View changed files

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

📄 Description

Description

Fixes a TypeError crash in SafeWebBaseLoader._fetch() caused by passing allow_redirects both in self.requests_kwargs and as an explicit keyword argument to session.get().

Root Cause

In SafeWebBaseLoader.__init__(), allow_redirects is added to self.requests_kwargs. Then in _fetch(), allow_redirects=AIOHTTP_CLIENT_ALLOW_REDIRECTS is also passed explicitly to session.get(). Since self.requests_kwargs is unpacked with **, this creates a duplicate keyword argument that aiohttp rejects with a TypeError.

Fix

Remove the explicit allow_redirects=AIOHTTP_CLIENT_ALLOW_REDIRECTS from the session.get() call in _fetch(). The value is already present in self.requests_kwargs and will be passed via the ** unpacking.

Fixes #24560


🔄 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/24600 **Author:** [@EvanYao826](https://github.com/EvanYao826) **Created:** 5/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/safe-web-loader-duplicate-allow-redirects` --- ### 📝 Commits (1) - [`9176b6c`](https://github.com/open-webui/open-webui/commit/9176b6ca503d2bcb6719f2f70c9bd129af1c8f64) fix: remove duplicate allow_redirects kwarg in SafeWebBaseLoader._fetch ### 📊 Changes **1 file changed** (+0 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/retrieval/web/utils.py` (+0 -1) </details> ### 📄 Description ## Description Fixes a `TypeError` crash in `SafeWebBaseLoader._fetch()` caused by passing `allow_redirects` both in `self.requests_kwargs` and as an explicit keyword argument to `session.get()`. ### Root Cause In `SafeWebBaseLoader.__init__()`, `allow_redirects` is added to `self.requests_kwargs`. Then in `_fetch()`, `allow_redirects=AIOHTTP_CLIENT_ALLOW_REDIRECTS` is also passed explicitly to `session.get()`. Since `self.requests_kwargs` is unpacked with `**`, this creates a duplicate keyword argument that `aiohttp` rejects with a `TypeError`. ### Fix Remove the explicit `allow_redirects=AIOHTTP_CLIENT_ALLOW_REDIRECTS` from the `session.get()` call in `_fetch()`. The value is already present in `self.requests_kwargs` and will be passed via the `**` unpacking. Fixes #24560 --- <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-18 15:58:54 -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#115047