mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #866] [MERGED] fix: RAG scan unsupported mime type #7293
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/866
Author: @asedmammad
Created: 2/23/2024
Status: ✅ Merged
Merged: 2/23/2024
Merged by: @tjbck
Base:
main← Head:fix-rag-scan-unsupported-mime📝 Commits (1)
b473ad5fix: RAG scan unsupported mimetype📊 Changes
1 file changed (+5 additions, -5 deletions)
View changed files
📝
backend/apps/rag/main.py(+5 -5)📄 Description
Description
This fixes an issue with RAG scan that stops loading documents as soon as it reaches a file with unsupported mime type (or any other exceptions).
When the mime type is not supported, the scan operation stops with
'NoneType' object has no attribute 'find'.Sample unsupported mime type: triage_process.graffle
Explanation of changes
file_content_typeis not None before searching fortext/and useTextLoaderIn case of the
triage_process.grafflewe fallback to TextLoader, but it seem to fail with loading, so we continue with the next document.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.