Target branch: This pull request targets the dev branch.
Description: Fixes a bug in knowledge file loading where CSV files with non-UTF-8 encodings would fail.
Changelog: Added a Fixed entry following Keep a Changelog format.
Testing: Manually tested with multiple CSV encodings.
Code review: Self-reviewed for correctness and style.
Prefix:fix
Changelog Entry
Description
Fixes an encoding-related bug that prevented some CSV files from loading into the knowledge base. This change enables automatic encoding detection by passing autodetect_encoding=True to the CSVLoader.
Fixed
CSVLoader now detects encoding automatically to support non-UTF-8 CSV files.
Screenshots or Videos
🔄 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/12170
**Author:** [@JunaidPinjari](https://github.com/JunaidPinjari)
**Created:** 3/29/2025
**Status:** ✅ Merged
**Merged:** 3/29/2025
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `fix/csv-autodetect-encoding`
---
### 📝 Commits (1)
- [`e782e7d`](https://github.com/open-webui/open-webui/commit/e782e7d3a768e68d26ab6818265fb8f3c0a48083) Fix: CSV loader encoding issue using autodetect_encoding=True
### 📊 Changes
**1 file changed** (+1 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/retrieval/loaders/main.py` (+1 -1)
</details>
### 📄 Description
- [x] **Target branch:** This pull request targets the `dev` branch.
- [x] **Description:** Fixes a bug in knowledge file loading where CSV files with non-UTF-8 encodings would fail.
- [x] **Changelog:** Added a `Fixed` entry following Keep a Changelog format.
- [x] **Testing:** Manually tested with multiple CSV encodings.
- [x] **Code review:** Self-reviewed for correctness and style.
- [x] **Prefix:** `fix`
---
# Changelog Entry
### Description
Fixes an encoding-related bug that prevented some CSV files from loading into the knowledge base. This change enables automatic encoding detection by passing `autodetect_encoding=True` to the `CSVLoader`.
### Fixed
- CSVLoader now detects encoding automatically to support non-UTF-8 CSV files.
---
### Screenshots or Videos

---
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12170
Author: @JunaidPinjari
Created: 3/29/2025
Status: ✅ Merged
Merged: 3/29/2025
Merged by: @tjbck
Base:
dev← Head:fix/csv-autodetect-encoding📝 Commits (1)
e782e7dFix: CSV loader encoding issue using autodetect_encoding=True📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/retrieval/loaders/main.py(+1 -1)📄 Description
devbranch.Fixedentry following Keep a Changelog format.fixChangelog Entry
Description
Fixes an encoding-related bug that prevented some CSV files from loading into the knowledge base. This change enables automatic encoding detection by passing
autodetect_encoding=Trueto theCSVLoader.Fixed
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.