[GH-ISSUE #14302] issue: uploading a pdf triggers rapidocr-onnxruntime package not found despite package being installed #136932

Closed
opened 2026-05-25 05:45:52 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @abcd678 on GitHub (May 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14302

Check Existing Issues

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

Installation Method

Other

Open WebUI Version

v0.6.10

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04

Browser (if applicable)

No response

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 listed steps to reproduce the bug in detail.

Expected Behavior

When adding a PDF with default content extraction engine options, should receive no errors

Actual Behavior

Instantly receive error below
rapidocr-onnxruntime package not found, please install it with pip install rapidocr-onnxruntime
pip package is installed
Image

Requirement already satisfied: rapidocr-onnxruntime in /home/OpenWebUI/venv/lib/python3.11/site-packages (1.4.4) Requirement already satisfied: pyclipper>=1.2.0 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (1.3.0.post6) Requirement already satisfied: opencv-python>=4.5.1.48 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (4.11.0.86) Requirement already satisfied: numpy<3.0.0,>=1.19.5 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (1.26.4) Requirement already satisfied: six>=1.15.0 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (1.17.0) Requirement already satisfied: Shapely!=2.0.4,>=1.7.1 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (2.1.1) Requirement already satisfied: PyYAML in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (6.0.2) Requirement already satisfied: Pillow in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (11.1.0) Requirement already satisfied: onnxruntime>=1.7.0 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (1.20.1) Requirement already satisfied: tqdm in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (4.67.1) Requirement already satisfied: coloredlogs in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (15.0.1) Requirement already satisfied: flatbuffers in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (25.2.10) Requirement already satisfied: packaging in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (23.2) Requirement already satisfied: protobuf in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (5.29.4) Requirement already satisfied: sympy in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (1.14.0) Requirement already satisfied: humanfriendly>=9.1 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from coloredlogs->onnxruntime>=1.7.0->rapidocr-onnxruntime) (10.0) Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from sympy->onnxruntime>=1.7.0->rapidocr-onnxruntime) (1.3.0)

Steps to Reproduce

Install open-webUI with python+venv installation instructions
upload pdf to chat

Logs & Screenshots

2025-05-25 00:13:12.405 | INFO | open_webui.routers.files:upload_file:91 - file.content_type: application/pdf - {} 2025-05-25 00:13:12.483 | ERROR | open_webui.routers.retrieval:process_file:1260 - rapidocr-onnxruntimepackage not found, please install it withpip install rapidocr-onnxruntime` - {}
Traceback (most recent call last):

File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 102, in _analyze_image
from rapidocr_onnxruntime import RapidOCR
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/rapidocr_onnxruntime/init.py", line 4, in
from .main import RapidOCR
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/rapidocr_onnxruntime/main.py", line 8, in
import cv2
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/cv2/init.py", line 181, in
bootstrap()
└ <function bootstrap at 0x77ae00614e00>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
│ └ <function import_module at 0x77af0ba6eac0>
└ <module 'importlib' from '/usr/lib/python3.11/importlib/init.py'>
File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'cv2'
│ └ <function _gcd_import at 0x77af0bc07d80>
└ <module '_frozen_importlib' (frozen)>

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/lib/python3.11/threading.py", line 1002, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x77af0bb149a0>
└ <WorkerThread(AnyIO worker thread, started 131588855682624)>
File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x77ae02cc1a80>
└ <WorkerThread(AnyIO worker thread, started 131588855682624)>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
│ │ │ └ ()
│ │ └ functools.partial(<function upload_file at 0x77ae3057fec0>, user=UserModel(id='4e510679-2e06-40f6-a5bc-fae05d975901', name='p...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x77ae02d3b580>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/files.py", line 162, in upload_file
process_file(request, ProcessFileForm(file_id=id), user=user)
│ │ │ │ └ UserModel(id='4e510679-2e06-40f6-a5bc-fae05d975901', name='redacted', email='redacted@hotmail.com', role='admin', profile_ima...
│ │ │ └ '59250849-4166-46d6-a38d-a453032e8f78'
│ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
│ └ <starlette.requests.Request object at 0x77ae02c24fd0>
└ <function process_file at 0x77ae2d3e5da0>

File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1179, in process_file
docs = loader.load(
│ └ <function Loader.load at 0x77ae2e1ad620>
└ <open_webui.retrieval.loaders.main.Loader object at 0x77ae02bfb590>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/retrieval/loaders/main.py", line 201, in load
docs = loader.load()
│ └ <function BaseLoader.load at 0x77ae2e84f100>
└ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 32, in load
return list(self.lazy_load())
│ └ <function PyPDFLoader.lazy_load at 0x77ae2e178900>
└ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/pdf.py", line 305, in lazy_load
yield from self.parser.lazy_parse(blob)
│ │ │ └ Blob 131589275275888 /home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/data/uploads/59250849-4166-46d6-a38d-a45303...
│ │ └ <function PyPDFParser.lazy_parse at 0x77ae2e347380>
│ └ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0>
└ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/pdf.py", line 397, in lazy_parse
images_from_page = self.extract_images_from_page(page)
│ │ └ {'/Type': '/Page', '/Parent': IndirectObject(180, 0, 131589982620880), '/Resources': IndirectObject(207, 0, 131589982620880),...
│ └ <function PyPDFParser.extract_images_from_page at 0x77ae2e347420>
└ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/pdf.py", line 462, in extract_images_from_page
image_text = next(self.images_parser.lazy_parse(blob)).page_content
│ │ │ └ Blob 131589214222560
│ │ └ <function BaseImageBlobParser.lazy_parse at 0x77ae2e346020>
│ └ <langchain_community.document_loaders.parsers.images.RapidOCRBlobParser object at 0x77ae02d1ab10>
└ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 63, in lazy_parse
content = self._analyze_image(img)
│ │ └ <PIL.PngImagePlugin.PngImageFile image mode=RGB size=707x707 at 0x77AE005B7D10>
│ └ <function RapidOCRBlobParser._analyze_image at 0x77ae2e346160>
└ <langchain_community.document_loaders.parsers.images.RapidOCRBlobParser object at 0x77ae02d1ab10>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 106, in _analyze_image
raise ImportError(

ImportError: rapidocr-onnxruntime package not found, please install it with pip install rapidocr-onnxruntime
2025-05-25 00:13:12.487 | ERROR | open_webui.routers.files:upload_file:171 - 400: rapidocr-onnxruntime package not found, please install it with pip install rapidocr-onnxruntime - {}
Traceback (most recent call last):

File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 102, in _analyze_image
from rapidocr_onnxruntime import RapidOCR
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/rapidocr_onnxruntime/init.py", line 4, in
from .main import RapidOCR
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/rapidocr_onnxruntime/main.py", line 8, in
import cv2
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/cv2/init.py", line 181, in
bootstrap()
└ <function bootstrap at 0x77ae00614e00>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/cv2/init.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
│ └ <function import_module at 0x77af0ba6eac0>
└ <module 'importlib' from '/usr/lib/python3.11/importlib/init.py'>
File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'cv2'
│ └ <function _gcd_import at 0x77af0bc07d80>
└ <module '_frozen_importlib' (frozen)>

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1179, in process_file
docs = loader.load(
│ └ <function Loader.load at 0x77ae2e1ad620>
└ <open_webui.retrieval.loaders.main.Loader object at 0x77ae02bfb590>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/retrieval/loaders/main.py", line 201, in load
docs = loader.load()
│ └ <function BaseLoader.load at 0x77ae2e84f100>
└ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 32, in load
return list(self.lazy_load())
│ └ <function PyPDFLoader.lazy_load at 0x77ae2e178900>
└ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/pdf.py", line 305, in lazy_load
yield from self.parser.lazy_parse(blob)
│ │ │ └ Blob 131589275275888 /home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/data/uploads/59250849-4166-46d6-a38d-a45303...
│ │ └ <function PyPDFParser.lazy_parse at 0x77ae2e347380>
│ └ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0>
└ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/pdf.py", line 397, in lazy_parse
images_from_page = self.extract_images_from_page(page)
│ │ └ {'/Type': '/Page', '/Parent': IndirectObject(180, 0, 131589982620880), '/Resources': IndirectObject(207, 0, 131589982620880),...
│ └ <function PyPDFParser.extract_images_from_page at 0x77ae2e347420>
└ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/pdf.py", line 462, in extract_images_from_page
image_text = next(self.images_parser.lazy_parse(blob)).page_content
│ │ │ └ Blob 131589214222560
│ │ └ <function BaseImageBlobParser.lazy_parse at 0x77ae2e346020>
│ └ <langchain_community.document_loaders.parsers.images.RapidOCRBlobParser object at 0x77ae02d1ab10>
└ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 63, in lazy_parse
content = self._analyze_image(img)
│ │ └ <PIL.PngImagePlugin.PngImageFile image mode=RGB size=707x707 at 0x77AE005B7D10>
│ └ <function RapidOCRBlobParser._analyze_image at 0x77ae2e346160>
└ <langchain_community.document_loaders.parsers.images.RapidOCRBlobParser object at 0x77ae02d1ab10>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 106, in _analyze_image
raise ImportError(

ImportError: rapidocr-onnxruntime package not found, please install it with pip install rapidocr-onnxruntime

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/lib/python3.11/threading.py", line 1002, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x77af0bb149a0>
└ <WorkerThread(AnyIO worker thread, started 131588855682624)>
File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x77ae02cc1a80>
└ <WorkerThread(AnyIO worker thread, started 131588855682624)>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
│ │ │ └ ()
│ │ └ functools.partial(<function upload_file at 0x77ae3057fec0>, user=UserModel(id='4e510679-2e06-40f6-a5bc-fae05d975901', name='p...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x77ae02d3b580>

File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/files.py", line 162, in upload_file
process_file(request, ProcessFileForm(file_id=id), user=user)
│ │ │ │ └ UserModel(id='4e510679-2e06-40f6-a5bc-fae05d975901', name='redacted', email='redacted@hotmail.com', role='admin', profile_ima...
│ │ │ └ '59250849-4166-46d6-a38d-a453032e8f78'
│ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
│ └ <starlette.requests.Request object at 0x77ae02c24fd0>
└ <function process_file at 0x77ae2d3e5da0>
File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1267, in process_file
raise HTTPException(
└ <class 'fastapi.exceptions.HTTPException'>

fastapi.exceptions.HTTPException: 400: rapidocr-onnxruntime package not found, please install it with pip install rapidocr-onnxruntime
2025-05-25 00:13:12.489 | ERROR | open_webui.routers.files:upload_file:172 - Error processing file: 59250849-4166-46d6-a38d-a453032e8f78 - {}`

Additional Information

No response

Originally created by @abcd678 on GitHub (May 25, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14302 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Other ### Open WebUI Version v0.6.10 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 22.04 ### Browser (if applicable) _No response_ ### 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 listed steps to reproduce the bug in detail. ### Expected Behavior When adding a PDF with default content extraction engine options, should receive no errors ### Actual Behavior Instantly receive error below `rapidocr-onnxruntime` package not found, please install it with `pip install rapidocr-onnxruntime` pip package is installed ![Image](https://github.com/user-attachments/assets/8c21ab11-a7bb-4edf-a175-312b48bfe50e) `Requirement already satisfied: rapidocr-onnxruntime in /home/OpenWebUI/venv/lib/python3.11/site-packages (1.4.4) Requirement already satisfied: pyclipper>=1.2.0 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (1.3.0.post6) Requirement already satisfied: opencv-python>=4.5.1.48 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (4.11.0.86) Requirement already satisfied: numpy<3.0.0,>=1.19.5 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (1.26.4) Requirement already satisfied: six>=1.15.0 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (1.17.0) Requirement already satisfied: Shapely!=2.0.4,>=1.7.1 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (2.1.1) Requirement already satisfied: PyYAML in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (6.0.2) Requirement already satisfied: Pillow in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (11.1.0) Requirement already satisfied: onnxruntime>=1.7.0 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (1.20.1) Requirement already satisfied: tqdm in /home/OpenWebUI/venv/lib/python3.11/site-packages (from rapidocr-onnxruntime) (4.67.1) Requirement already satisfied: coloredlogs in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (15.0.1) Requirement already satisfied: flatbuffers in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (25.2.10) Requirement already satisfied: packaging in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (23.2) Requirement already satisfied: protobuf in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (5.29.4) Requirement already satisfied: sympy in /home/OpenWebUI/venv/lib/python3.11/site-packages (from onnxruntime>=1.7.0->rapidocr-onnxruntime) (1.14.0) Requirement already satisfied: humanfriendly>=9.1 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from coloredlogs->onnxruntime>=1.7.0->rapidocr-onnxruntime) (10.0) Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/OpenWebUI/venv/lib/python3.11/site-packages (from sympy->onnxruntime>=1.7.0->rapidocr-onnxruntime) (1.3.0)` ### Steps to Reproduce Install open-webUI with python+venv installation instructions upload pdf to chat ### Logs & Screenshots `2025-05-25 00:13:12.405 | INFO | open_webui.routers.files:upload_file:91 - file.content_type: application/pdf - {} 2025-05-25 00:13:12.483 | ERROR | open_webui.routers.retrieval:process_file:1260 - `rapidocr-onnxruntime` package not found, please install it with `pip install rapidocr-onnxruntime` - {} Traceback (most recent call last): File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 102, in _analyze_image from rapidocr_onnxruntime import RapidOCR File "/home/OpenWebUI/venv/lib/python3.11/site-packages/rapidocr_onnxruntime/__init__.py", line 4, in <module> from .main import RapidOCR File "/home/OpenWebUI/venv/lib/python3.11/site-packages/rapidocr_onnxruntime/main.py", line 8, in <module> import cv2 File "/home/OpenWebUI/venv/lib/python3.11/site-packages/cv2/__init__.py", line 181, in <module> bootstrap() └ <function bootstrap at 0x77ae00614e00> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/cv2/__init__.py", line 153, in bootstrap native_module = importlib.import_module("cv2") │ └ <function import_module at 0x77af0ba6eac0> └ <module 'importlib' from '/usr/lib/python3.11/importlib/__init__.py'> File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) │ │ │ │ │ └ 0 │ │ │ │ └ None │ │ │ └ 0 │ │ └ 'cv2' │ └ <function _gcd_import at 0x77af0bc07d80> └ <module '_frozen_importlib' (frozen)> ImportError: libGL.so.1: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x77af0bb149a0> └ <WorkerThread(AnyIO worker thread, started 131588855682624)> File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x77ae02cc1a80> └ <WorkerThread(AnyIO worker thread, started 131588855682624)> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function upload_file at 0x77ae3057fec0>, user=UserModel(id='4e510679-2e06-40f6-a5bc-fae05d975901', name='p... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x77ae02d3b580> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/files.py", line 162, in upload_file process_file(request, ProcessFileForm(file_id=id), user=user) │ │ │ │ └ UserModel(id='4e510679-2e06-40f6-a5bc-fae05d975901', name='redacted', email='redacted@hotmail.com', role='admin', profile_ima... │ │ │ └ '59250849-4166-46d6-a38d-a453032e8f78' │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x77ae02c24fd0> └ <function process_file at 0x77ae2d3e5da0> > File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1179, in process_file docs = loader.load( │ └ <function Loader.load at 0x77ae2e1ad620> └ <open_webui.retrieval.loaders.main.Loader object at 0x77ae02bfb590> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/retrieval/loaders/main.py", line 201, in load docs = loader.load() │ └ <function BaseLoader.load at 0x77ae2e84f100> └ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 32, in load return list(self.lazy_load()) │ └ <function PyPDFLoader.lazy_load at 0x77ae2e178900> └ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/pdf.py", line 305, in lazy_load yield from self.parser.lazy_parse(blob) │ │ │ └ Blob 131589275275888 /home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/data/uploads/59250849-4166-46d6-a38d-a45303... │ │ └ <function PyPDFParser.lazy_parse at 0x77ae2e347380> │ └ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0> └ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/pdf.py", line 397, in lazy_parse images_from_page = self.extract_images_from_page(page) │ │ └ {'/Type': '/Page', '/Parent': IndirectObject(180, 0, 131589982620880), '/Resources': IndirectObject(207, 0, 131589982620880),... │ └ <function PyPDFParser.extract_images_from_page at 0x77ae2e347420> └ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/pdf.py", line 462, in extract_images_from_page image_text = next(self.images_parser.lazy_parse(blob)).page_content │ │ │ └ Blob 131589214222560 │ │ └ <function BaseImageBlobParser.lazy_parse at 0x77ae2e346020> │ └ <langchain_community.document_loaders.parsers.images.RapidOCRBlobParser object at 0x77ae02d1ab10> └ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 63, in lazy_parse content = self._analyze_image(img) │ │ └ <PIL.PngImagePlugin.PngImageFile image mode=RGB size=707x707 at 0x77AE005B7D10> │ └ <function RapidOCRBlobParser._analyze_image at 0x77ae2e346160> └ <langchain_community.document_loaders.parsers.images.RapidOCRBlobParser object at 0x77ae02d1ab10> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 106, in _analyze_image raise ImportError( ImportError: `rapidocr-onnxruntime` package not found, please install it with `pip install rapidocr-onnxruntime` 2025-05-25 00:13:12.487 | ERROR | open_webui.routers.files:upload_file:171 - 400: `rapidocr-onnxruntime` package not found, please install it with `pip install rapidocr-onnxruntime` - {} Traceback (most recent call last): File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 102, in _analyze_image from rapidocr_onnxruntime import RapidOCR File "/home/OpenWebUI/venv/lib/python3.11/site-packages/rapidocr_onnxruntime/__init__.py", line 4, in <module> from .main import RapidOCR File "/home/OpenWebUI/venv/lib/python3.11/site-packages/rapidocr_onnxruntime/main.py", line 8, in <module> import cv2 File "/home/OpenWebUI/venv/lib/python3.11/site-packages/cv2/__init__.py", line 181, in <module> bootstrap() └ <function bootstrap at 0x77ae00614e00> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/cv2/__init__.py", line 153, in bootstrap native_module = importlib.import_module("cv2") │ └ <function import_module at 0x77af0ba6eac0> └ <module 'importlib' from '/usr/lib/python3.11/importlib/__init__.py'> File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) │ │ │ │ │ └ 0 │ │ │ │ └ None │ │ │ └ 0 │ │ └ 'cv2' │ └ <function _gcd_import at 0x77af0bc07d80> └ <module '_frozen_importlib' (frozen)> ImportError: libGL.so.1: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1179, in process_file docs = loader.load( │ └ <function Loader.load at 0x77ae2e1ad620> └ <open_webui.retrieval.loaders.main.Loader object at 0x77ae02bfb590> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/retrieval/loaders/main.py", line 201, in load docs = loader.load() │ └ <function BaseLoader.load at 0x77ae2e84f100> └ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 32, in load return list(self.lazy_load()) │ └ <function PyPDFLoader.lazy_load at 0x77ae2e178900> └ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/pdf.py", line 305, in lazy_load yield from self.parser.lazy_parse(blob) │ │ │ └ Blob 131589275275888 /home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/data/uploads/59250849-4166-46d6-a38d-a45303... │ │ └ <function PyPDFParser.lazy_parse at 0x77ae2e347380> │ └ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0> └ <langchain_community.document_loaders.pdf.PyPDFLoader object at 0x77ae0333b5d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/pdf.py", line 397, in lazy_parse images_from_page = self.extract_images_from_page(page) │ │ └ {'/Type': '/Page', '/Parent': IndirectObject(180, 0, 131589982620880), '/Resources': IndirectObject(207, 0, 131589982620880),... │ └ <function PyPDFParser.extract_images_from_page at 0x77ae2e347420> └ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/pdf.py", line 462, in extract_images_from_page image_text = next(self.images_parser.lazy_parse(blob)).page_content │ │ │ └ Blob 131589214222560 │ │ └ <function BaseImageBlobParser.lazy_parse at 0x77ae2e346020> │ └ <langchain_community.document_loaders.parsers.images.RapidOCRBlobParser object at 0x77ae02d1ab10> └ <langchain_community.document_loaders.parsers.pdf.PyPDFParser object at 0x77ae02c356d0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 63, in lazy_parse content = self._analyze_image(img) │ │ └ <PIL.PngImagePlugin.PngImageFile image mode=RGB size=707x707 at 0x77AE005B7D10> │ └ <function RapidOCRBlobParser._analyze_image at 0x77ae2e346160> └ <langchain_community.document_loaders.parsers.images.RapidOCRBlobParser object at 0x77ae02d1ab10> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/langchain_community/document_loaders/parsers/images.py", line 106, in _analyze_image raise ImportError( ImportError: `rapidocr-onnxruntime` package not found, please install it with `pip install rapidocr-onnxruntime` During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x77af0bb149a0> └ <WorkerThread(AnyIO worker thread, started 131588855682624)> File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x77ae02cc1a80> └ <WorkerThread(AnyIO worker thread, started 131588855682624)> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function upload_file at 0x77ae3057fec0>, user=UserModel(id='4e510679-2e06-40f6-a5bc-fae05d975901', name='p... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x77ae02d3b580> > File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/files.py", line 162, in upload_file process_file(request, ProcessFileForm(file_id=id), user=user) │ │ │ │ └ UserModel(id='4e510679-2e06-40f6-a5bc-fae05d975901', name='redacted', email='redacted@hotmail.com', role='admin', profile_ima... │ │ │ └ '59250849-4166-46d6-a38d-a453032e8f78' │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x77ae02c24fd0> └ <function process_file at 0x77ae2d3e5da0> File "/home/OpenWebUI/venv/lib/python3.11/site-packages/open_webui/routers/retrieval.py", line 1267, in process_file raise HTTPException( └ <class 'fastapi.exceptions.HTTPException'> fastapi.exceptions.HTTPException: 400: `rapidocr-onnxruntime` package not found, please install it with `pip install rapidocr-onnxruntime` 2025-05-25 00:13:12.489 | ERROR | open_webui.routers.files:upload_file:172 - Error processing file: 59250849-4166-46d6-a38d-a453032e8f78 - {}` ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-25 05:45:52 -05:00
Author
Owner

@rgaricano commented on GitHub (May 25, 2025):

it seem as requirement isn't installed properly
what's your openwebui install method?
did you "pip install backend/requirements.txt" without errors?

<!-- gh-comment-id:2907769134 --> @rgaricano commented on GitHub (May 25, 2025): it seem as requirement isn't installed properly what's your openwebui install method? did you "pip install backend/requirements.txt" without errors?
Author
Owner

@abcd678 commented on GitHub (May 25, 2025):

I installed using the python + venv instructions here: https://docs.openwebui.com/getting-started/quick-start/
This does not come with backend folder for openwebui or a requirements.txt (using find / as root)
In my initial message I already showed that rapidocr-onnxruntime is installed, running pip list inside of the venv also shows that the correct version is installed.

(venv) root@OpenWebUI:/home/OpenWebUI/venv# pip show rapidocr-onnxruntime
Name: rapidocr-onnxruntime
Version: 1.4.4
Summary: A cross platform OCR Library based on OnnxRuntime.
Home-page: https://github.com/RapidAI/RapidOCR
Author: SWHL
Author-email: liekkaskono@163.com
License: Apache-2.0
Location: /home/OpenWebUI/venv/lib/python3.11/site-packages
Requires: numpy, onnxruntime, opencv-python, Pillow, pyclipper, PyYAML, Shapely, six, tqdm
Required-by: open-webui

it's also owned by openwebui:openwebui

<!-- gh-comment-id:2907866245 --> @abcd678 commented on GitHub (May 25, 2025): I installed using the python + venv instructions here: https://docs.openwebui.com/getting-started/quick-start/ This does not come with backend folder for openwebui or a requirements.txt (using find / as root) In my initial message I already showed that rapidocr-onnxruntime is installed, running pip list inside of the venv also shows that the correct version is installed. (venv) root@OpenWebUI:/home/OpenWebUI/venv# pip show rapidocr-onnxruntime Name: rapidocr-onnxruntime Version: 1.4.4 Summary: A cross platform OCR Library based on OnnxRuntime. Home-page: https://github.com/RapidAI/RapidOCR Author: SWHL Author-email: liekkaskono@163.com License: Apache-2.0 Location: /home/OpenWebUI/venv/lib/python3.11/site-packages Requires: numpy, onnxruntime, opencv-python, Pillow, pyclipper, PyYAML, Shapely, six, tqdm Required-by: open-webui it's also owned by openwebui:openwebui
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#136932