[GH-ISSUE #16086] issue: PDF OCR fails to extract text from images when Content Extraction Engine set to Default (regression since v0.6.16) #121090

Closed
opened 2026-05-20 22:57:26 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @hifun0916 on GitHub (Jul 28, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16086

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.18

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04

Browser (if applicable)

Chrome 138.0.7204.159

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using 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 every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When I navigate to Workspace -> Knowledge -> Add Content and upload a PDF file that contains only one image with text, I expect the system to successfully perform PDF OCR functionality and extract the text from the image.

Actual Behavior

Failed to add file.
400: The content provided is empty. Please ensure that there is text or data present before proceeding.

Image

Request URL
http://192.168.120.176:8003/api/v1/files/
Response:

{
    "id": "2dbf904e-f205-4259-83f4-7217d25263c5",
    "user_id": "20966312-613f-40c5-90a4-03efc91a7a4d",
    "hash": null,
    "filename": "engocr.pdf",
    "data": {},
    "meta": {
        "name": "engocr.pdf",
        "content_type": "application/pdf",
        "size": 182891,
        "data": {}
    },
    "created_at": 1753686857,
    "updated_at": 1753686857,
    "path": "/app/backend/data/uploads/2dbf904e-f205-4259-83f4-7217d25263c5_engocr.pdf",
    "access_control": null,
    "error": "The content provided is empty. Please ensure that there is text or data present before proceeding."
}

Request URL
http://192.168.120.176:8003/api/v1/knowledge/6b675494-97e0-4f42-b28b-88e8a059a4c2/file/add
{file_id:2dbf904e-f205-4259-83f4-7217d25263c5}
Response:
400: The content provided is empty. Please ensure that there is text or data present before proceeding.

Steps to Reproduce

  1. Open WebUI installation is done by pulling the Docker image from the Hub
docker run -p 8003:8080 -e OPENAI_API_KEY=your_secret_key -v open-webui:/app/backend/data --name webui --restart always ghcr.io/open-webui/open-webui:main
  1. Connected to the OpenWebUI

  2. Admin Panel -> Settings -> Documents:

Content Extraction Engine is set to Default
PDF Extract Images (OCR) is enabled
"rag": {
    "CONTENT_EXTRACTION_ENGINE": "",
    "pdf_extract_images": true,
}
Image
  1. Navigate to Workspace -> Knowledge -> Add Content and upload the attached PDF fileengocr.pdf

Logs & Screenshots

Browser console logs.

index.ts:183 
 POST http://192.168.120.176:8003/api/v1/knowledge/6b675494-97e0-4f42-b28b-88e8a059a4c2/file/add 400 (Bad Request)

index.ts:204 
{detail: '400: The content provided is empty. Please ensure … there is text or data present before proceeding.'}
detail: 
"400: The content provided is empty. Please ensure that there is text or data present before proceeding."
[[Prototype]]
: Object
Image

Docker container logs.

2025-07-28 06:40:07.117 | INFO     | open_webui.routers.files:upload_file:95 - file.content_type: application/pdf - {}
2025-07-28 06:40:07.131 | INFO     | open_webui.routers.retrieval:save_docs_to_vector_db:1137 - save_docs_to_vector_db: document engocr.pdf file-84ef6018-6948-4db0-8e69-44274f46063b - {}
2025-07-28 06:40:07.132 | ERROR    | open_webui.routers.retrieval:process_file:1515 - The content provided is empty. Please ensure that there is text or data present before proceeding. - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7fd0ee7149a0>
    └ <WorkerThread(AnyIO worker thread, started 140531141355200)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7fcf6f315440>
    └ <WorkerThread(AnyIO worker thread, started 140531141355200)>
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             │       │   │      └ ()
             │       │   └ functools.partial(<function upload_file at 0x7fd07a987ec0>, user=UserModel(id='20966312-613f-40c5-90a4-03efc91a7a4d', name='t...
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7fcf027f1700>

  File "/app/backend/open_webui/routers/files.py", line 183, in upload_file
    process_file(request, ProcessFileForm(file_id=id), user=user)
    │            │        │                       │         └ UserModel(id='20966312-613f-40c5-90a4-03efc91a7a4d', name='test', email='test@gmail.com', role='admin', profile_image_url='da...
    │            │        │                       └ '84ef6018-6948-4db0-8e69-44274f46063b'
    │            │        └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
    │            └ <starlette.requests.Request object at 0x7fcf027f2c10>
    └ <function process_file at 0x7fd078108f40>

> File "/app/backend/open_webui/routers/retrieval.py", line 1505, in process_file
    raise e
          └ ValueError(<ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present be...

  File "/app/backend/open_webui/routers/retrieval.py", line 1477, in process_file
    result = save_docs_to_vector_db(
             └ <function save_docs_to_vector_db at 0x7fd0780ce520>

  File "/app/backend/open_webui/routers/retrieval.py", line 1225, in save_docs_to_vector_db
    raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
                     │              └ <ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present before procee...
                     └ <enum 'ERROR_MESSAGES'>

ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.
2025-07-28 06:40:07.133 | ERROR    | open_webui.routers.files:upload_file:192 - 400: The content provided is empty. Please ensure that there is text or data present before proceeding. - {}
Traceback (most recent call last):

  File "/app/backend/open_webui/routers/retrieval.py", line 1505, in process_file
    raise e

  File "/app/backend/open_webui/routers/retrieval.py", line 1477, in process_file
    result = save_docs_to_vector_db(
             └ <function save_docs_to_vector_db at 0x7fd0780ce520>

  File "/app/backend/open_webui/routers/retrieval.py", line 1225, in save_docs_to_vector_db
    raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
                     │              └ <ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present before procee...
                     └ <enum 'ERROR_MESSAGES'>

ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7fd0ee7149a0>
    └ <WorkerThread(AnyIO worker thread, started 140531141355200)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7fcf6f315440>
    └ <WorkerThread(AnyIO worker thread, started 140531141355200)>
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             │       │   │      └ ()
             │       │   └ functools.partial(<function upload_file at 0x7fd07a987ec0>, user=UserModel(id='20966312-613f-40c5-90a4-03efc91a7a4d', name='t...
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7fcf027f1700>

> File "/app/backend/open_webui/routers/files.py", line 183, in upload_file
    process_file(request, ProcessFileForm(file_id=id), user=user)
    │            │        │                       │         └ UserModel(id='20966312-613f-40c5-90a4-03efc91a7a4d', name='test', email='test@gmail.com', role='admin', profile_image_url='da...
    │            │        │                       └ '84ef6018-6948-4db0-8e69-44274f46063b'
    │            │        └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
    │            └ <starlette.requests.Request object at 0x7fcf027f2c10>
    └ <function process_file at 0x7fd078108f40>

  File "/app/backend/open_webui/routers/retrieval.py", line 1522, in process_file
    raise HTTPException(
          └ <class 'fastapi.exceptions.HTTPException'>

fastapi.exceptions.HTTPException: 400: The content provided is empty. Please ensure that there is text or data present before proceeding.
2025-07-28 06:40:07.135 | ERROR    | open_webui.routers.files:upload_file:193 - Error processing file: 84ef6018-6948-4db0-8e69-44274f46063b - {}
2025-07-28 06:40:07.136 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 10.1.131.140:59697 - "POST /api/v1/files/ HTTP/1.1" 200 - {}
2025-07-28 06:40:07.178 | INFO     | open_webui.routers.retrieval:save_docs_to_vector_db:1137 - save_docs_to_vector_db: document engocr.pdf 6b675494-97e0-4f42-b28b-88e8a059a4c2 - {}
2025-07-28 06:40:07.179 | ERROR    | open_webui.routers.retrieval:process_file:1515 - The content provided is empty. Please ensure that there is text or data present before proceeding. - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7fd0ee7149a0>
    └ <WorkerThread(AnyIO worker thread, started 140531141355200)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7fcf6f315440>
    └ <WorkerThread(AnyIO worker thread, started 140531141355200)>
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             │       │   │      └ ()
             │       │   └ functools.partial(<function add_file_to_knowledge_by_id at 0x7fd0738194e0>, user=UserModel(id='20966312-613f-40c5-90a4-03efc9...
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7fcf027f03c0>

  File "/app/backend/open_webui/routers/knowledge.py", line 372, in add_file_to_knowledge_by_id
    process_file(
    └ <function process_file at 0x7fd078108f40>

> File "/app/backend/open_webui/routers/retrieval.py", line 1505, in process_file
    raise e
          └ ValueError(<ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present be...

  File "/app/backend/open_webui/routers/retrieval.py", line 1477, in process_file
    result = save_docs_to_vector_db(
             └ <function save_docs_to_vector_db at 0x7fd0780ce520>

  File "/app/backend/open_webui/routers/retrieval.py", line 1225, in save_docs_to_vector_db
    raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
                     │              └ <ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present before procee...
                     └ <enum 'ERROR_MESSAGES'>

ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.

Additional Information

I have confirmed that the last version that worked correctly was v0.6.15.
All versions >= 0.6.16 exhibit this error.

Additionally, can someone tell me what OpenWebUI uses to perform PDF OCR when the Content Extraction Engine is set to Default?

Originally created by @hifun0916 on GitHub (Jul 28, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16086 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.18 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 22.04 ### Browser (if applicable) Chrome 138.0.7204.159 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using 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 every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When I navigate to Workspace -> Knowledge -> Add Content and upload a PDF file that contains only one image with text, I expect the system to successfully perform PDF OCR functionality and extract the text from the image. ### Actual Behavior Failed to add file. 400: The content provided is empty. Please ensure that there is text or data present before proceeding. <img width="375" height="177" alt="Image" src="https://github.com/user-attachments/assets/261dd6b7-919d-4080-adb0-8a821bef31e1" /> Request URL http://192.168.120.176:8003/api/v1/files/ Response: ``` { "id": "2dbf904e-f205-4259-83f4-7217d25263c5", "user_id": "20966312-613f-40c5-90a4-03efc91a7a4d", "hash": null, "filename": "engocr.pdf", "data": {}, "meta": { "name": "engocr.pdf", "content_type": "application/pdf", "size": 182891, "data": {} }, "created_at": 1753686857, "updated_at": 1753686857, "path": "/app/backend/data/uploads/2dbf904e-f205-4259-83f4-7217d25263c5_engocr.pdf", "access_control": null, "error": "The content provided is empty. Please ensure that there is text or data present before proceeding." } ``` Request URL http://192.168.120.176:8003/api/v1/knowledge/6b675494-97e0-4f42-b28b-88e8a059a4c2/file/add {file_id:2dbf904e-f205-4259-83f4-7217d25263c5} Response: `400: The content provided is empty. Please ensure that there is text or data present before proceeding.` ### Steps to Reproduce 1. Open WebUI installation is done by pulling the Docker image from the Hub ``` docker run -p 8003:8080 -e OPENAI_API_KEY=your_secret_key -v open-webui:/app/backend/data --name webui --restart always ghcr.io/open-webui/open-webui:main ``` 2. Connected to the OpenWebUI 3. Admin Panel -> Settings -> Documents: ``` Content Extraction Engine is set to Default PDF Extract Images (OCR) is enabled "rag": { "CONTENT_EXTRACTION_ENGINE": "", "pdf_extract_images": true, } ``` <img width="1122" height="161" alt="Image" src="https://github.com/user-attachments/assets/671b7689-cf7b-4d36-af91-44c8737d4674" /> 4. Navigate to Workspace -> Knowledge -> Add Content and upload the attached PDF file[engocr.pdf](https://github.com/user-attachments/files/21464413/engocr.pdf) ### Logs & Screenshots Browser console logs. ``` index.ts:183 POST http://192.168.120.176:8003/api/v1/knowledge/6b675494-97e0-4f42-b28b-88e8a059a4c2/file/add 400 (Bad Request) index.ts:204 {detail: '400: The content provided is empty. Please ensure … there is text or data present before proceeding.'} detail: "400: The content provided is empty. Please ensure that there is text or data present before proceeding." [[Prototype]] : Object ``` <img width="1447" height="119" alt="Image" src="https://github.com/user-attachments/assets/0fb5c856-6213-4a3e-a8b3-7cc3850f3b16" /> Docker container logs. ``` 2025-07-28 06:40:07.117 | INFO | open_webui.routers.files:upload_file:95 - file.content_type: application/pdf - {} 2025-07-28 06:40:07.131 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1137 - save_docs_to_vector_db: document engocr.pdf file-84ef6018-6948-4db0-8e69-44274f46063b - {} 2025-07-28 06:40:07.132 | ERROR | open_webui.routers.retrieval:process_file:1515 - The content provided is empty. Please ensure that there is text or data present before proceeding. - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7fd0ee7149a0> └ <WorkerThread(AnyIO worker thread, started 140531141355200)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7fcf6f315440> └ <WorkerThread(AnyIO worker thread, started 140531141355200)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function upload_file at 0x7fd07a987ec0>, user=UserModel(id='20966312-613f-40c5-90a4-03efc91a7a4d', name='t... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7fcf027f1700> File "/app/backend/open_webui/routers/files.py", line 183, in upload_file process_file(request, ProcessFileForm(file_id=id), user=user) │ │ │ │ └ UserModel(id='20966312-613f-40c5-90a4-03efc91a7a4d', name='test', email='test@gmail.com', role='admin', profile_image_url='da... │ │ │ └ '84ef6018-6948-4db0-8e69-44274f46063b' │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x7fcf027f2c10> └ <function process_file at 0x7fd078108f40> > File "/app/backend/open_webui/routers/retrieval.py", line 1505, in process_file raise e └ ValueError(<ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present be... File "/app/backend/open_webui/routers/retrieval.py", line 1477, in process_file result = save_docs_to_vector_db( └ <function save_docs_to_vector_db at 0x7fd0780ce520> File "/app/backend/open_webui/routers/retrieval.py", line 1225, in save_docs_to_vector_db raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT) │ └ <ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present before procee... └ <enum 'ERROR_MESSAGES'> ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding. 2025-07-28 06:40:07.133 | ERROR | open_webui.routers.files:upload_file:192 - 400: The content provided is empty. Please ensure that there is text or data present before proceeding. - {} Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 1505, in process_file raise e File "/app/backend/open_webui/routers/retrieval.py", line 1477, in process_file result = save_docs_to_vector_db( └ <function save_docs_to_vector_db at 0x7fd0780ce520> File "/app/backend/open_webui/routers/retrieval.py", line 1225, in save_docs_to_vector_db raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT) │ └ <ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present before procee... └ <enum 'ERROR_MESSAGES'> ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7fd0ee7149a0> └ <WorkerThread(AnyIO worker thread, started 140531141355200)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7fcf6f315440> └ <WorkerThread(AnyIO worker thread, started 140531141355200)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function upload_file at 0x7fd07a987ec0>, user=UserModel(id='20966312-613f-40c5-90a4-03efc91a7a4d', name='t... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7fcf027f1700> > File "/app/backend/open_webui/routers/files.py", line 183, in upload_file process_file(request, ProcessFileForm(file_id=id), user=user) │ │ │ │ └ UserModel(id='20966312-613f-40c5-90a4-03efc91a7a4d', name='test', email='test@gmail.com', role='admin', profile_image_url='da... │ │ │ └ '84ef6018-6948-4db0-8e69-44274f46063b' │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x7fcf027f2c10> └ <function process_file at 0x7fd078108f40> File "/app/backend/open_webui/routers/retrieval.py", line 1522, in process_file raise HTTPException( └ <class 'fastapi.exceptions.HTTPException'> fastapi.exceptions.HTTPException: 400: The content provided is empty. Please ensure that there is text or data present before proceeding. 2025-07-28 06:40:07.135 | ERROR | open_webui.routers.files:upload_file:193 - Error processing file: 84ef6018-6948-4db0-8e69-44274f46063b - {} 2025-07-28 06:40:07.136 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 10.1.131.140:59697 - "POST /api/v1/files/ HTTP/1.1" 200 - {} 2025-07-28 06:40:07.178 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1137 - save_docs_to_vector_db: document engocr.pdf 6b675494-97e0-4f42-b28b-88e8a059a4c2 - {} 2025-07-28 06:40:07.179 | ERROR | open_webui.routers.retrieval:process_file:1515 - The content provided is empty. Please ensure that there is text or data present before proceeding. - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7fd0ee7149a0> └ <WorkerThread(AnyIO worker thread, started 140531141355200)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7fcf6f315440> └ <WorkerThread(AnyIO worker thread, started 140531141355200)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function add_file_to_knowledge_by_id at 0x7fd0738194e0>, user=UserModel(id='20966312-613f-40c5-90a4-03efc9... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7fcf027f03c0> File "/app/backend/open_webui/routers/knowledge.py", line 372, in add_file_to_knowledge_by_id process_file( └ <function process_file at 0x7fd078108f40> > File "/app/backend/open_webui/routers/retrieval.py", line 1505, in process_file raise e └ ValueError(<ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present be... File "/app/backend/open_webui/routers/retrieval.py", line 1477, in process_file result = save_docs_to_vector_db( └ <function save_docs_to_vector_db at 0x7fd0780ce520> File "/app/backend/open_webui/routers/retrieval.py", line 1225, in save_docs_to_vector_db raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT) │ └ <ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present before procee... └ <enum 'ERROR_MESSAGES'> ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding. ``` ### Additional Information I have confirmed that the last version that worked correctly was v0.6.15. All versions >= 0.6.16 exhibit this error. Additionally, can someone tell me what OpenWebUI uses to perform PDF OCR when the Content Extraction Engine is set to Default?
GiteaMirror added the bug label 2026-05-20 22:57:26 -05:00
Author
Owner

@rgaricano commented on GitHub (Jul 28, 2025):

It's not a regression, it's a well know issue of the pypdf lib, that fault when ocr some pdfs within certain images types inside. It had same faults in all versions.

<!-- gh-comment-id:3126245547 --> @rgaricano commented on GitHub (Jul 28, 2025): It's not a regression, it's a well know issue of the pypdf lib, that fault when ocr some pdfs within certain images types inside. It had same faults in all versions.
Author
Owner

@hifun0916 commented on GitHub (Jul 28, 2025):

It's not a regression, it's a well know issue of the pypdf lib, that fault when ocr some pdfs within certain images types inside. It had same faults in all versions.

But I can confirm that the exact same PDF file worked correctly in v0.6.15.
Could you help explain why it worked in v0.6.15 if this is a consistent pypdf library issue across all versions?

<!-- gh-comment-id:3126287393 --> @hifun0916 commented on GitHub (Jul 28, 2025): > It's not a regression, it's a well know issue of the pypdf lib, that fault when ocr some pdfs within certain images types inside. It had same faults in all versions. But I can confirm that the exact same PDF file worked correctly in v0.6.15. Could you help explain why it worked in v0.6.15 if this is a consistent pypdf library issue across all versions?
Author
Owner

@SlavikCA commented on GitHub (Aug 13, 2025):

I have same (or similar?) issue.
I was using Med Gemma 3 to look at the images (JPG, not PDF).

Now that doesn't work. Error:

| ERROR    | open_webui.routers.files:upload_file:192 - 400: The content provided is empty. Please ensure that there is text or data present before proceeding.
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 1509, in process_file
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 1481, in process_file
    result = save_docs_to_vector_db(
             └ <function save_docs_to_vector_db at 0x741a3611ef20>
  File "/app/backend/open_webui/routers/retrieval.py", line 1240, in save_docs_to_vector_db
    raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
                     │              └ <ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present before procee...
                     └ <enum 'ERROR_MESSAGES'>
ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x741a857c49a0>
    └ <WorkerThread(AnyIO worker thread, started 127653860333248)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7419e358b380>
    └ <WorkerThread(AnyIO worker thread, started 127653860333248)>
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             │       │   │      └ ()
             │       │   └ functools.partial(<function upload_file at 0x741a38f17560>, user=UserModel(id='13464eec-b5c1-4779-a681-82ec1c54df53', name='S...
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7419e3290c40>
> File "/app/backend/open_webui/routers/files.py", line 183, in upload_file
    process_file(request, ProcessFileForm(file_id=id), user=user)
    │            │        │                       │         └ UserModel(id='13464eec-b5c1-4779-a681-82ec1c54df53', name='Slavik', email='slavik@fursov.family', role='admin', profile_image...
    │            │        │                       └ '0b3e9624-b414-46f4-999d-bf122583cb1b'
    │            │        └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
    │            └ <starlette.requests.Request object at 0x7419e261ab90>
    └ <function process_file at 0x741a3611fc40>
  File "/app/backend/open_webui/routers/retrieval.py", line 1526, in process_file
    raise HTTPException(
          └ <class 'fastapi.exceptions.HTTPException'>
fastapi.exceptions.HTTPException: 400: The content provided is empty. Please ensure that there is text or data present before proceeding.
2025-08-13 01:59:22.647 | ERROR    | open_webui.routers.files:upload_file:193 - Error processing file: 0b3e9624-b414-46f4-999d-bf122583cb1b

I apologize, if that's different issue. Let me know and I'll create separate ticket.

<!-- gh-comment-id:3184307503 --> @SlavikCA commented on GitHub (Aug 13, 2025): I have same (or similar?) issue. I was using Med Gemma 3 to look at the images (JPG, not PDF). Now that doesn't work. Error: ``` | ERROR | open_webui.routers.files:upload_file:192 - 400: The content provided is empty. Please ensure that there is text or data present before proceeding. Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 1509, in process_file raise e File "/app/backend/open_webui/routers/retrieval.py", line 1481, in process_file result = save_docs_to_vector_db( └ <function save_docs_to_vector_db at 0x741a3611ef20> File "/app/backend/open_webui/routers/retrieval.py", line 1240, in save_docs_to_vector_db raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT) │ └ <ERROR_MESSAGES.EMPTY_CONTENT: 'The content provided is empty. Please ensure that there is text or data present before procee... └ <enum 'ERROR_MESSAGES'> ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x741a857c49a0> └ <WorkerThread(AnyIO worker thread, started 127653860333248)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7419e358b380> └ <WorkerThread(AnyIO worker thread, started 127653860333248)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function upload_file at 0x741a38f17560>, user=UserModel(id='13464eec-b5c1-4779-a681-82ec1c54df53', name='S... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7419e3290c40> > File "/app/backend/open_webui/routers/files.py", line 183, in upload_file process_file(request, ProcessFileForm(file_id=id), user=user) │ │ │ │ └ UserModel(id='13464eec-b5c1-4779-a681-82ec1c54df53', name='Slavik', email='slavik@fursov.family', role='admin', profile_image... │ │ │ └ '0b3e9624-b414-46f4-999d-bf122583cb1b' │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x7419e261ab90> └ <function process_file at 0x741a3611fc40> File "/app/backend/open_webui/routers/retrieval.py", line 1526, in process_file raise HTTPException( └ <class 'fastapi.exceptions.HTTPException'> fastapi.exceptions.HTTPException: 400: The content provided is empty. Please ensure that there is text or data present before proceeding. 2025-08-13 01:59:22.647 | ERROR | open_webui.routers.files:upload_file:193 - Error processing file: 0b3e9624-b414-46f4-999d-bf122583cb1b ``` I apologize, if that's different issue. Let me know and I'll create separate ticket.
Author
Owner

@hifun0916 commented on GitHub (Aug 15, 2025):

I have same (or similar?) issue. I was using Med Gemma 3 to look at the images (JPG, not PDF).
Now that doesn't work.

Your issue looks quite similar to mine, but I’m not entirely sure if it’s the same root cause. Have you tried running it on v0.6.15? I only started seeing this error after upgrading to v0.6.16.

<!-- gh-comment-id:3190306258 --> @hifun0916 commented on GitHub (Aug 15, 2025): > I have same (or similar?) issue. I was using Med Gemma 3 to look at the images (JPG, not PDF). > Now that doesn't work. Your issue looks quite similar to mine, but I’m not entirely sure if it’s the same root cause. Have you tried running it on v0.6.15? I only started seeing this error after upgrading to v0.6.16.
Author
Owner

@tjbck commented on GitHub (Aug 21, 2025):

Upstream issue: https://github.com/langchain-ai/langchain/issues/26225

<!-- gh-comment-id:3211635274 --> @tjbck commented on GitHub (Aug 21, 2025): Upstream issue: https://github.com/langchain-ai/langchain/issues/26225
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#121090