[GH-ISSUE #1444] [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/unstructured/nlp/english-words.txt' #83239

Closed
opened 2026-05-15 08:09:51 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @xcjs on GitHub (Apr 6, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1444

Bug Report

Description

When uploading a document and after clicking save, an error occurs regarding what I believe is a missing Python package.

Bug Summary:
[Provide a brief but clear summary of the bug]

See Description.

Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]

  1. Navigate to documents.
  2. Click the plus sign (+) to upload a new document.
  3. Browse for the document.
  4. Select a markdown file with a .md extension.
  5. Click the save button.

Expected Behavior:
[Describe what you expected to happen.]

Between the XSS bug and this bug, I haven't been able to experiment with the documents feature yet. I would expect the file to be uploaded and the context available for reference in an LLM conversation.

Actual Behavior:
[Describe what actually happened.]

The following error message appears:

image

Environment

  • Operating System: [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04]
    • Ubuntu 22.04
  • Browser (if applicable): [e.g., Chrome 100.0, Firefox 98.0]
    • Firefox (latest current version)

Reproduction Details

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.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

File { name: "Bug_report_template.md", lastModified: 1710914102929, webkitRelativePath: "", size: 1756, type: "" }
 md 6.c4b93b87.js:10:23236
Object { detail: "Something went wrong :/\n[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/unstructured/nlp/english-words.txt'" }
Tags.ec0e2682.js:1:2008
Expected declaration but found ‘undefined’.  Skipped to next declaration. documents:1:10

Docker Container Logs:
[Include relevant Docker container logs, if applicable]

INFO:     192.168.1.1:0 - "GET /api/v1/documents/ HTTP/1.1" 200 OK
INFO:apps.rag.main:file.content_type: application/octet-stream
ERROR:apps.rag.main:[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/unstructured/nlp/english-words.txt'
Traceback (most recent call last):
  File "/app/backend/apps/rag/main.py", line 467, in store_doc
    data = loader.load()
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 29, in load
    return list(self.lazy_load())
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 88, in lazy_load
    elements = self._get_elements()
               ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/markdown.py", line 32, in _get_elements
    from unstructured.partition.md import partition_md
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/md.py", line 15, in <module>
    from unstructured.partition.html import partition_html
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/html.py", line 7, in <module>
    from unstructured.documents.html import HTMLDocument
  File "/usr/local/lib/python3.11/site-packages/unstructured/documents/html.py", line 33, in <module>
    from unstructured.partition.text_type import (
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/text_type.py", line 15, in <module>
    from unstructured.nlp.english_words import ENGLISH_WORDS
  File "/usr/local/lib/python3.11/site-packages/unstructured/nlp/english_words.py", line 12, in <module>
    with open(ENGLISH_WORDS_FILE) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/unstructured/nlp/english-words.txt'
INFO:     192.168.1.1:0 - "POST /rag/api/v1/doc HTTP/1.1" 400 Bad Request
INFO:     69.162.124.238:0 - "GET / HTTP/1.1" 200 OK

Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]

See above.

Installation Method

I'm using the Docker images.

Additional Information

[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]

I have no additional information to provide that I'm aware of.

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @xcjs on GitHub (Apr 6, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/1444 # Bug Report ## Description When uploading a document and after clicking save, an error occurs regarding what I believe is a missing Python package. **Bug Summary:** [Provide a brief but clear summary of the bug] See Description. **Steps to Reproduce:** [Outline the steps to reproduce the bug. Be as detailed as possible.] 1. Navigate to documents. 2. Click the plus sign (+) to upload a new document. 3. Browse for the document. 4. Select a markdown file with a .md extension. 5. Click the save button. **Expected Behavior:** [Describe what you expected to happen.] Between the XSS bug and this bug, I haven't been able to experiment with the documents feature yet. I would expect the file to be uploaded and the context available for reference in an LLM conversation. **Actual Behavior:** [Describe what actually happened.] The following error message appears: ![image](https://github.com/open-webui/open-webui/assets/5085205/435a9f38-4046-4fca-a2ab-8231717fbb0c) ## Environment - **Operating System:** [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04] - Ubuntu 22.04 - **Browser (if applicable):** [e.g., Chrome 100.0, Firefox 98.0] - Firefox (latest current version) ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] 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. ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] ```text File { name: "Bug_report_template.md", lastModified: 1710914102929, webkitRelativePath: "", size: 1756, type: "" } md 6.c4b93b87.js:10:23236 Object { detail: "Something went wrong :/\n[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/unstructured/nlp/english-words.txt'" } Tags.ec0e2682.js:1:2008 Expected declaration but found ‘undefined’. Skipped to next declaration. documents:1:10 ``` **Docker Container Logs:** [Include relevant Docker container logs, if applicable] ```text INFO: 192.168.1.1:0 - "GET /api/v1/documents/ HTTP/1.1" 200 OK INFO:apps.rag.main:file.content_type: application/octet-stream ERROR:apps.rag.main:[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/unstructured/nlp/english-words.txt' Traceback (most recent call last): File "/app/backend/apps/rag/main.py", line 467, in store_doc data = loader.load() ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 29, in load return list(self.lazy_load()) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 88, in lazy_load elements = self._get_elements() ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/markdown.py", line 32, in _get_elements from unstructured.partition.md import partition_md File "/usr/local/lib/python3.11/site-packages/unstructured/partition/md.py", line 15, in <module> from unstructured.partition.html import partition_html File "/usr/local/lib/python3.11/site-packages/unstructured/partition/html.py", line 7, in <module> from unstructured.documents.html import HTMLDocument File "/usr/local/lib/python3.11/site-packages/unstructured/documents/html.py", line 33, in <module> from unstructured.partition.text_type import ( File "/usr/local/lib/python3.11/site-packages/unstructured/partition/text_type.py", line 15, in <module> from unstructured.nlp.english_words import ENGLISH_WORDS File "/usr/local/lib/python3.11/site-packages/unstructured/nlp/english_words.py", line 12, in <module> with open(ENGLISH_WORDS_FILE) as f: ^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/unstructured/nlp/english-words.txt' INFO: 192.168.1.1:0 - "POST /rag/api/v1/doc HTTP/1.1" 400 Bad Request INFO: 69.162.124.238:0 - "GET / HTTP/1.1" 200 OK ``` **Screenshots (if applicable):** [Attach any relevant screenshots to help illustrate the issue] See above. ## Installation Method I'm using the Docker images. ## Additional Information [Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.] I have no additional information to provide that I'm aware of. ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@cmalpass commented on GitHub (Apr 6, 2024):

I had this same problem. I found that the underlying python package that provides this functionality had a bad build and it left out some crucial files (like the one mentioned). The latest build version includes them again.

You can reinstall / force install this package using the following command from the command line or docker exec:

pip install unstructured --force-reinstall

Here are some more docs in case you want to do a full document support reinstall:

pip install "unstructured[all-docs]" --force-reinstall

Unstructured Docs

<!-- gh-comment-id:2041155878 --> @cmalpass commented on GitHub (Apr 6, 2024): I had this same problem. I found that the underlying python package that provides this functionality had a bad build and it left out some crucial files (like the one mentioned). The latest build version includes them again. You can reinstall / force install this package using the following command from the command line or docker exec: `pip install unstructured --force-reinstall` Here are some more docs in case you want to do a full document support reinstall: `pip install "unstructured[all-docs]" --force-reinstall` [Unstructured Docs](https://pypi.org/project/unstructured/)
Author
Owner

@xcjs commented on GitHub (Apr 6, 2024):

@cmalpass Thanks for the workaround! Unfortunately it's not a permanent fix until the container is updated. My container orchestration will break it again every 24 hours.

<!-- gh-comment-id:2041156411 --> @xcjs commented on GitHub (Apr 6, 2024): @cmalpass Thanks for the workaround! Unfortunately it's not a permanent fix until the container is updated. My container orchestration will break it again every 24 hours.
Author
Owner

@justinh-rahb commented on GitHub (Apr 6, 2024):

I had this same problem. I found that the underlying python package that provides this functionality had a bad build and it left out some crucial files (like the one mentioned). The latest build version includes them again.

You can reinstall / force install this package using the following command from the command line or docker exec:

pip install unstructured --force-reinstall

Here are some more docs in case you want to do a full document support reinstall:

pip install "unstructured[all-docs]" --force-reinstall

Unstructured Docs

Thanks @cmalpass, we can just force-push a new docker build through to fix it then.

<!-- gh-comment-id:2041156886 --> @justinh-rahb commented on GitHub (Apr 6, 2024): > I had this same problem. I found that the underlying python package that provides this functionality had a bad build and it left out some crucial files (like the one mentioned). The latest build version includes them again. > > You can reinstall / force install this package using the following command from the command line or docker exec: > > `pip install unstructured --force-reinstall` > > Here are some more docs in case you want to do a full document support reinstall: > > `pip install "unstructured[all-docs]" --force-reinstall` > > [Unstructured Docs](https://pypi.org/project/unstructured/) Thanks @cmalpass, we can just force-push a new docker build through to fix it then.
Author
Owner

@tjbck commented on GitHub (Apr 6, 2024):

Merged dev branch to main, let me know if the issue persists!

<!-- gh-comment-id:2041229056 --> @tjbck commented on GitHub (Apr 6, 2024): Merged dev branch to main, let me know if the issue persists!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#83239