[GH-ISSUE #19153] issue: Error importing .xlsx files #73392

Closed
opened 2026-05-13 05:41:29 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @MacJedi42 on GitHub (Nov 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19153

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.36

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04

Browser (if applicable)

Chrome

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

.XLSX Excel document should have been attached to the chat and injested into RAG pipeline.

Actual Behavior

Error occurs in the backend, file looks attached on the front end but the AI model can't see the content.

Steps to Reproduce

  1. Open a new chat
  2. Select an .xlsx document
  3. Upload the Document

Logs & Screenshots

Backend Log:

2025-11-13 04:14:38.664 | ERROR | open_webui.routers.retrieval:process_file:1706 - No module named 'msoffcrypto'
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 0x77b2e27689a0>
└ <WorkerThread(AnyIO worker thread, started 131607417554624)>
File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x77b278cf87c0>
└ <WorkerThread(AnyIO worker thread, started 131607417554624)>
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 976, in run
result = context.run(func, *args)
│ │ │ └ ()
│ │ └ functools.partial(<function process_uploaded_file at 0x77b2b863f2e0>, <starlette.requests.Request object at 0x77b24d37eed0>, ...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x77b24d527280>
File "/app/backend/open_webui/routers/files.py", line 117, in process_uploaded_file
process_file(request, ProcessFileForm(file_id=file_item.id), user=user)
│ │ │ │ │ └ UserModel(id='3819c2a5-9ab8-4286-b5f3-aa5f3fa66226', name='Insight Admin', email='admin@xx.co.nz', username=None...
│ │ │ │ └ '314ae1a1-a733-4e76-8a07-52b73b5c79b1'
│ │ │ └ FileModel(id='314ae1a1-a733-4e76-8a07-52b73b5c79b1', user_id='3819c2a5-9ab8-4286-b5f3-aa5f3fa66226', hash=None, filename='1.x...
│ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
│ └ <starlette.requests.Request object at 0x77b24d37eed0>
└ <function process_file at 0x77b29cba3740>

File "/app/backend/open_webui/routers/retrieval.py", line 1617, in process_file
docs = loader.load(
│ └ <function Loader.load at 0x77b29d717880>
└ <open_webui.retrieval.loaders.main.Loader object at 0x77b273462050>
File "/app/backend/open_webui/retrieval/loaders/main.py", line 238, in load
docs = loader.load()
│ └ <function BaseLoader.load at 0x77b29edb2c00>
└ <langchain_community.document_loaders.excel.UnstructuredExcelLoader object at 0x77b23e886410>
File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 43, in load
return list(self.lazy_load())
│ └ <function UnstructuredBaseLoader.lazy_load at 0x77b29ee1c900>
└ <langchain_community.document_loaders.excel.UnstructuredExcelLoader object at 0x77b23e886410>
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 107, in lazy_load
elements = self._get_elements()
│ └ <function UnstructuredExcelLoader._get_elements at 0x77b29d726980>
└ <langchain_community.document_loaders.excel.UnstructuredExcelLoader object at 0x77b23e886410>
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/excel.py", line 50, in _get_elements
from unstructured.partition.xlsx import partition_xlsx
File "/usr/local/lib/python3.11/site-packages/unstructured/partition/xlsx.py", line 11, in
from msoffcrypto import OfficeFile
ModuleNotFoundError: No module named 'msoffcrypto'

Browser Console Logs:

Manifest: Enctype should be set to either application/x-www-form-urlencoded or multipart/form-data. It currently defaults to application/x-www-form-urlencoded
D8KNNnB9.js:146 [tiptap warn]: Duplicate extension names found: ['codeBlock', 'bulletList', 'listItem', 'listKeymap', 'orderedList']. This can lead to issues.
_d @ D8KNNnB9.js:146
Cud9CC1-.js:6 File upload warning: No module named 'msoffcrypto'
Tt @ Cud9CC1-.js:6

Additional Information

No response

Originally created by @MacJedi42 on GitHub (Nov 13, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/19153 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.36 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 22.04 ### Browser (if applicable) Chrome ### 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 .XLSX Excel document should have been attached to the chat and injested into RAG pipeline. ### Actual Behavior Error occurs in the backend, file looks attached on the front end but the AI model can't see the content. ### Steps to Reproduce 1. Open a new chat 2. Select an .xlsx document 3. Upload the Document ### Logs & Screenshots Backend Log: 2025-11-13 04:14:38.664 | ERROR | open_webui.routers.retrieval:process_file:1706 - No module named 'msoffcrypto' 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 0x77b2e27689a0> └ <WorkerThread(AnyIO worker thread, started 131607417554624)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x77b278cf87c0> └ <WorkerThread(AnyIO worker thread, started 131607417554624)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 976, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function process_uploaded_file at 0x77b2b863f2e0>, <starlette.requests.Request object at 0x77b24d37eed0>, ... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x77b24d527280> File "/app/backend/open_webui/routers/files.py", line 117, in process_uploaded_file process_file(request, ProcessFileForm(file_id=file_item.id), user=user) │ │ │ │ │ └ UserModel(id='3819c2a5-9ab8-4286-b5f3-aa5f3fa66226', name='Insight Admin', email='admin@xx.co.nz', username=None... │ │ │ │ └ '314ae1a1-a733-4e76-8a07-52b73b5c79b1' │ │ │ └ FileModel(id='314ae1a1-a733-4e76-8a07-52b73b5c79b1', user_id='3819c2a5-9ab8-4286-b5f3-aa5f3fa66226', hash=None, filename='1.x... │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x77b24d37eed0> └ <function process_file at 0x77b29cba3740> > File "/app/backend/open_webui/routers/retrieval.py", line 1617, in process_file docs = loader.load( │ └ <function Loader.load at 0x77b29d717880> └ <open_webui.retrieval.loaders.main.Loader object at 0x77b273462050> File "/app/backend/open_webui/retrieval/loaders/main.py", line 238, in load docs = loader.load() │ └ <function BaseLoader.load at 0x77b29edb2c00> └ <langchain_community.document_loaders.excel.UnstructuredExcelLoader object at 0x77b23e886410> File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 43, in load return list(self.lazy_load()) │ └ <function UnstructuredBaseLoader.lazy_load at 0x77b29ee1c900> └ <langchain_community.document_loaders.excel.UnstructuredExcelLoader object at 0x77b23e886410> File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 107, in lazy_load elements = self._get_elements() │ └ <function UnstructuredExcelLoader._get_elements at 0x77b29d726980> └ <langchain_community.document_loaders.excel.UnstructuredExcelLoader object at 0x77b23e886410> File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/excel.py", line 50, in _get_elements from unstructured.partition.xlsx import partition_xlsx File "/usr/local/lib/python3.11/site-packages/unstructured/partition/xlsx.py", line 11, in <module> from msoffcrypto import OfficeFile ModuleNotFoundError: No module named 'msoffcrypto' Browser Console Logs: Manifest: Enctype should be set to either application/x-www-form-urlencoded or multipart/form-data. It currently defaults to application/x-www-form-urlencoded D8KNNnB9.js:146 [tiptap warn]: Duplicate extension names found: ['codeBlock', 'bulletList', 'listItem', 'listKeymap', 'orderedList']. This can lead to issues. _d @ D8KNNnB9.js:146 Cud9CC1-.js:6 File upload warning: No module named 'msoffcrypto' Tt @ Cud9CC1-.js:6 ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-13 05:41:29 -05:00
Author
Owner

@tjbck commented on GitHub (Nov 13, 2025):

Likely an upstream issue, 84912904fd might've addressed this in the latest dev, testing wanted here.

<!-- gh-comment-id:3525328328 --> @tjbck commented on GitHub (Nov 13, 2025): Likely an upstream issue, 84912904fd5545c8cbab2afffb208896b1a09c69 might've addressed this in the latest dev, testing wanted here.
Author
Owner

@silentoplayz commented on GitHub (Nov 13, 2025):

Linking a related discussion post - https://github.com/open-webui/open-webui/discussions/19152

<!-- gh-comment-id:3525341921 --> @silentoplayz commented on GitHub (Nov 13, 2025): Linking a related discussion post - https://github.com/open-webui/open-webui/discussions/19152
Author
Owner

@rgaricano commented on GitHub (Nov 13, 2025):

Related: https://github.com/open-webui/open-webui/discussions/19090#discussioncomment-14936859

Root Cause

The problem is a version upgrade of the unstructured package__ from 0.16.17 (v0.6.34) to 0.18.15 (current version).

The unstructured==0.18.15 package has a dependency on msoffcrypto-tool that was introduced in version 0.17 or later. This dependency is required for handling Excel files (.xlsx), especially encrypted ones.

In v0.6.34, the version was unstructured==0.16.17, which did NOT require msoffcrypto-tool, so Excel files worked fine.

The Fix

We have tested this fix and it works.

Add the missing dependency. Add msoffcrypto-tool to backend/requirements.txt
...
Requirement chardat is also missing when using some test/csv files.

<!-- gh-comment-id:3526321717 --> @rgaricano commented on GitHub (Nov 13, 2025): Related: https://github.com/open-webui/open-webui/discussions/19090#discussioncomment-14936859 > ## Root Cause > The problem is a version upgrade of the `unstructured` package__ from `0.16.17` (v0.6.34) to `0.18.15` (current version). > > The `unstructured==0.18.15` package has a **dependency on `msoffcrypto-tool`** that was introduced in version 0.17 or later. This dependency is required for handling Excel files (.xlsx), especially encrypted ones. > > In v0.6.34, the version was `unstructured==0.16.17`, which did NOT require `msoffcrypto-tool`, so Excel files worked fine. > > ## The Fix > We have tested this fix and it works. > > Add the missing dependency. Add `msoffcrypto-tool` to `backend/requirements.txt` ... > Requirement `chardat` is also missing when using some test/csv files. >
Author
Owner

@tjbck commented on GitHub (Nov 14, 2025):

Addressed in dev.

<!-- gh-comment-id:3530416566 --> @tjbck commented on GitHub (Nov 14, 2025): Addressed in dev.
Author
Owner

@kerlion commented on GitHub (Nov 14, 2025):

It has the same issue when upload a excel file, fixed by: pip install msoffcrypto-tool

<!-- gh-comment-id:3530424069 --> @kerlion commented on GitHub (Nov 14, 2025): It has the same issue when upload a excel file, fixed by: pip install msoffcrypto-tool
Author
Owner

@kerlion commented on GitHub (Nov 14, 2025):

It has the same issue when upload a excel file in normal char box, fixed by: pip install msoffcrypto-tool.

<!-- gh-comment-id:3530426303 --> @kerlion commented on GitHub (Nov 14, 2025): It has the same issue when upload a excel file in normal char box, fixed by: pip install msoffcrypto-tool.
Author
Owner

@silentoplayz commented on GitHub (Nov 14, 2025):

It has the same issue when upload a excel file in normal char box, fixed by: pip install msoffcrypto-tool.

Again, the issue has been addressed on the dev branch. 4d41013804

<!-- gh-comment-id:3530439744 --> @silentoplayz commented on GitHub (Nov 14, 2025): > It has the same issue when upload a excel file in normal char box, fixed by: pip install msoffcrypto-tool. Again, the issue has been addressed on the dev branch. https://github.com/open-webui/open-webui/commit/4d4101380455f4881740c8ac567593f00865be79
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#73392