[GH-ISSUE #10211] Unable to edit knowledge uploaded file #15809

Closed
opened 2026-04-19 21:55:35 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @5t0x2fH1z on GitHub (Feb 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10211

Bug Report

Installation Method

Installed via "Development Methods" - git clone. main branch

Environment

  • Open WebUI Version: [v0.5.11]

  • Ollama (if applicable): [no]

  • Operating System: [macOS 15.3]

  • Browser (if applicable): [Safari 18.3, Chrome 133.0.6943.55]

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Edited file saved to vectorstore

Actual Behavior:

Error rices: Expected metadata value to be a str, int, float or bool, got {} which is a dict in add.
And file disappears from vector store but remain in admin panel under knowledge menu. It breaks RAG functionality as model unable to get context

Description

Bug Summary:
Any of knowledge files can't be edited

Reproduction Details

Steps to Reproduce:

  1. Create knowledge
  2. Upload file (text or csv) or create text content
  3. Wait until embedded
  4. Click on file name to edit it
  5. Edit and click save

Logs and Screenshots

Docker Container Logs:
INFO: 127.0.0.1:56903 - "POST /api/v1/files/e10878f0-8fde-4e19-bc86-224736d8c422/data/content/update HTTP/1.1" 200 OK
DEBUG [open_webui.routers.retrieval] text_content: some test content
INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document Untitled1.txt 71cc6194-1f2d-44b3-adfa-9ca2893917fd
INFO [open_webui.routers.retrieval] collection 71cc6194-1f2d-44b3-adfa-9ca2893917fd already exists
INFO [open_webui.routers.retrieval] adding to collection 71cc6194-1f2d-44b3-adfa-9ca2893917fd
ERROR [open_webui.routers.retrieval] Expected metadata value to be a str, int, float or bool, got {} which is a dict in add.
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 207, in _validate_and_prepare_add_request
validate_insert_record_set(record_set=add_records)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 230, in validate_insert_record_set
validate_metadatas(record_set["metadatas"])
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 592, in validate_metadatas
validate_metadata(metadata)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 558, in validate_metadata
raise ValueError(
ValueError: Expected metadata value to be a str, int, float or bool, got {} which is a dict

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 811, in save_docs_to_vector_db
VECTOR_DB_CLIENT.insert(
File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/retrieval/vector/dbs/chroma.py", line 141, in insert
collection.add(*batch)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 82, in add
add_request = self._validate_and_prepare_add_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 93, in wrapper
raise type(e)(msg).with_traceback(e.traceback)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 207, in _validate_and_prepare_add_request
validate_insert_record_set(record_set=add_records)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 230, in validate_insert_record_set
validate_metadatas(record_set["metadatas"])
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 592, in validate_metadatas
validate_metadata(metadata)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 558, in validate_metadata
raise ValueError(
ValueError: Expected metadata value to be a str, int, float or bool, got {} which is a dict in add.
ERROR [open_webui.routers.retrieval] Expected metadata value to be a str, int, float or bool, got {} which is a dict in add.
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 207, in _validate_and_prepare_add_request
validate_insert_record_set(record_set=add_records)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 230, in validate_insert_record_set
validate_metadatas(record_set["metadatas"])
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 592, in validate_metadatas
validate_metadata(metadata)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 558, in validate_metadata
raise ValueError(
ValueError: Expected metadata value to be a str, int, float or bool, got {} which is a dict

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 974, in process_file
raise e
File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 946, in process_file
result = save_docs_to_vector_db(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 819, in save_docs_to_vector_db
raise e
File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 811, in save_docs_to_vector_db
VECTOR_DB_CLIENT.insert(
File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/retrieval/vector/dbs/chroma.py", line 141, in insert
collection.add(*batch)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 82, in add
add_request = self._validate_and_prepare_add_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 93, in wrapper
raise type(e)(msg).with_traceback(e.traceback)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 207, in _validate_and_prepare_add_request
validate_insert_record_set(record_set=add_records)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 230, in validate_insert_record_set
validate_metadatas(record_set["metadatas"])
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 592, in validate_metadatas
validate_metadata(metadata)
File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 558, in validate_metadata
raise ValueError(
ValueError: Expected metadata value to be a str, int, float or bool, got {} which is a dict in add.
INFO: 127.0.0.1:56904 - "POST /api/v1/knowledge/71cc6194-1f2d-44b3-adfa-9ca2893917fd/file/update HTTP/1.1" 400 Bad Request

Screenshots/Screen Recordings (if applicable):

Image
Originally created by @5t0x2fH1z on GitHub (Feb 17, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/10211 # Bug Report ## Installation Method Installed via "Development Methods" - git clone. main branch ## Environment - **Open WebUI Version:** [v0.5.11] - **Ollama (if applicable):** [no] - **Operating System:** [macOS 15.3] - **Browser (if applicable):** [Safari 18.3, Chrome 133.0.6943.55] **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [ ] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Edited file saved to vectorstore ## Actual Behavior: Error rices: Expected metadata value to be a str, int, float or bool, got {} which is a dict in add. And file disappears from vector store but remain in admin panel under knowledge menu. It breaks RAG functionality as model unable to get context ## Description **Bug Summary:** Any of knowledge files can't be edited ## Reproduction Details **Steps to Reproduce:** 1. Create knowledge 2. Upload file (text or csv) or create text content 3. Wait until embedded 4. Click on file name to edit it 5. Edit and click save ## Logs and Screenshots **Docker Container Logs:** INFO: 127.0.0.1:56903 - "POST /api/v1/files/e10878f0-8fde-4e19-bc86-224736d8c422/data/content/update HTTP/1.1" 200 OK DEBUG [open_webui.routers.retrieval] text_content: some test content INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document Untitled1.txt 71cc6194-1f2d-44b3-adfa-9ca2893917fd INFO [open_webui.routers.retrieval] collection 71cc6194-1f2d-44b3-adfa-9ca2893917fd already exists INFO [open_webui.routers.retrieval] adding to collection 71cc6194-1f2d-44b3-adfa-9ca2893917fd ERROR [open_webui.routers.retrieval] Expected metadata value to be a str, int, float or bool, got {} which is a dict in add. Traceback (most recent call last): File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 207, in _validate_and_prepare_add_request validate_insert_record_set(record_set=add_records) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 230, in validate_insert_record_set validate_metadatas(record_set["metadatas"]) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 592, in validate_metadatas validate_metadata(metadata) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 558, in validate_metadata raise ValueError( ValueError: Expected metadata value to be a str, int, float or bool, got {} which is a dict During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 811, in save_docs_to_vector_db VECTOR_DB_CLIENT.insert( File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/retrieval/vector/dbs/chroma.py", line 141, in insert collection.add(*batch) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 82, in add add_request = self._validate_and_prepare_add_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 93, in wrapper raise type(e)(msg).with_traceback(e.__traceback__) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 207, in _validate_and_prepare_add_request validate_insert_record_set(record_set=add_records) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 230, in validate_insert_record_set validate_metadatas(record_set["metadatas"]) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 592, in validate_metadatas validate_metadata(metadata) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 558, in validate_metadata raise ValueError( ValueError: Expected metadata value to be a str, int, float or bool, got {} which is a dict in add. ERROR [open_webui.routers.retrieval] Expected metadata value to be a str, int, float or bool, got {} which is a dict in add. Traceback (most recent call last): File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 207, in _validate_and_prepare_add_request validate_insert_record_set(record_set=add_records) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 230, in validate_insert_record_set validate_metadatas(record_set["metadatas"]) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 592, in validate_metadatas validate_metadata(metadata) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 558, in validate_metadata raise ValueError( ValueError: Expected metadata value to be a str, int, float or bool, got {} which is a dict During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 974, in process_file raise e File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 946, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 819, in save_docs_to_vector_db raise e File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/routers/retrieval.py", line 811, in save_docs_to_vector_db VECTOR_DB_CLIENT.insert( File "/Users/5t0x2fh1z/Dev/ai/open-webui/backend/open_webui/retrieval/vector/dbs/chroma.py", line 141, in insert collection.add(*batch) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 82, in add add_request = self._validate_and_prepare_add_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 93, in wrapper raise type(e)(msg).with_traceback(e.__traceback__) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 207, in _validate_and_prepare_add_request validate_insert_record_set(record_set=add_records) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 230, in validate_insert_record_set validate_metadatas(record_set["metadatas"]) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 592, in validate_metadatas validate_metadata(metadata) File "/opt/homebrew/Caskroom/miniconda/base/envs/open-webui/lib/python3.11/site-packages/chromadb/api/types.py", line 558, in validate_metadata raise ValueError( ValueError: Expected metadata value to be a str, int, float or bool, got {} which is a dict in add. INFO: 127.0.0.1:56904 - "POST /api/v1/knowledge/71cc6194-1f2d-44b3-adfa-9ca2893917fd/file/update HTTP/1.1" 400 Bad Request **Screenshots/Screen Recordings (if applicable):** <img width="1512" alt="Image" src="https://github.com/user-attachments/assets/06a7396a-bc9c-4d12-8998-5e2b00e611d8" />
Author
Owner

@tjbck commented on GitHub (Feb 17, 2025):

This should be resolved in dev!

<!-- gh-comment-id:2664219607 --> @tjbck commented on GitHub (Feb 17, 2025): This should be resolved in dev!
Author
Owner

@rgaricano commented on GitHub (Feb 17, 2025):

in ver 0.5.12 i can't edit name, only content & work properly,
but i found other issue: when click over name (linked to https://xxxxx/api/v1/files/26aecb16-b733-4d88-9a9f-9bbcd57f7d89/content ) I have not content, only an {"detail":"[ERROR: Error getting file content]"}

<!-- gh-comment-id:2664228238 --> @rgaricano commented on GitHub (Feb 17, 2025): in ver 0.5.12 i can't edit name, only content & work properly, but i found other issue: when click over name (linked to https://xxxxx/api/v1/files/26aecb16-b733-4d88-9a9f-9bbcd57f7d89/content ) I have not content, only an {"detail":"[ERROR: Error getting file content]"}
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#15809