[PR #12170] [MERGED] Fix: CSV loader encoding issue using autodetect_encoding=True #22858

Closed
opened 2026-04-20 04:27:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 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: devHead: fix/csv-autodetect-encoding


📝 Commits (1)

  • e782e7d Fix: 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

  • 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

image



🔄 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 ![image](https://github.com/user-attachments/assets/07f2785a-71a1-4118-95a9-c0cbd4b2672e) --- --- <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-04-20 04:27:10 -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#22858