[GH-ISSUE #16603] issue: Uploading documents with brackets in the filename gives "'PosixPath' object is not iterable" #17973

Closed
opened 2026-04-19 23:52:39 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @RenHoekNL on GitHub (Aug 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16603

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.22 (latest)

Ollama Version (if applicable)

0.11.4

Operating System

Debian GNU/Linux 12 (bookworm) (docker)

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 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

  • Log in as admin on the web GUI
  • Click your profile icon (top-right) -> Admin Panel -> Settings -> Models
  • Select the llama model
  • Knowledge -> Upload Files
  • Pick a file and upload it

Expected behaviour: File is uploaded

Actual Behavior

Web browser pops up message saying: 'PosixPath' object is not iterable

The filename has brackets '[]' in it. When I copied the file, removed the backets from the name and uploaded it. It works fine.

The fact that the brackets break the code, could indicate that somewhere user-input it interpreted. A possible security issue.

Steps to Reproduce

See above.

Upload a file with brackets in the filename, e.g. "hello [world] today.txt"

Logs & Screenshots

2025-08-14 03:52:21.003 | INFO | open_webui.routers.files:upload_file:95 - file.content_type: application/epub+zip
2025-08-14 03:52:21.037 | ERROR | open_webui.routers.retrieval:process_file:1519 - 'PosixPath' object is not iterable
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 0x74d5559589a0>
└ <WorkerThread(AnyIO worker thread, started 128455081838272)>
File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x74d4b8696d40>
└ <WorkerThread(AnyIO worker thread, started 128455081838272)>
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 0x74d509066200>, user=UserModel(id='30d5e137-ad6b-4dbf-9610-6a5a7003e898', name='r...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x74d4b8c550c0>

File "/app/backend/open_webui/routers/files.py", line 183, in upload_file
process_file(request, ProcessFileForm(file_id=id), user=user)
│ │ │ │ └ UserModel(id='30d5e137-ad6b-4dbf-9610-6a5a7003e898', name='ren', email='no@example.com', role='admin', profile_image_url='dat...
│ │ │ └ '7cbacd0c-3230-4016-8eff-c851b5103be3'
│ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
│ └ <starlette.requests.Request object at 0x74d4442f0f90>
└ <function process_file at 0x74d506237240>

File "/app/backend/open_webui/routers/retrieval.py", line 1438, in process_file
docs = loader.load(
│ └ <function Loader.load at 0x74d506cc1b20>
└ <open_webui.retrieval.loaders.main.Loader object at 0x74d4443d2cd0>

File "/app/backend/open_webui/retrieval/loaders/main.py", line 218, in load
docs = loader.load()
│ └ <function BaseLoader.load at 0x74d5071e1440>
└ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>

File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 32, in load
return list(self.lazy_load())
│ └ <function UnstructuredBaseLoader.lazy_load at 0x74d5071e3060>
└ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 107, in lazy_load
elements = self._get_elements()
│ └ <function UnstructuredEPubLoader._get_elements at 0x74d506d114e0>
└ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/epub.py", line 55, in _get_elements
return partition_epub(filename=self.file_path, **self.unstructured_kwargs)
│ │ │ │ └ {}
│ │ │ └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>
│ │ └ '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx (1994, H...
│ └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>
└ <function partition_epub at 0x74d4b82322a0>
File "/usr/local/lib/python3.11/site-packages/unstructured/partition/epub.py", line 48, in partition_epub
html_text = convert_file_to_html_text_using_pandoc(
└ <function convert_file_to_html_text_using_pandoc at 0x74d4b82c0ea0>
File "/usr/local/lib/python3.11/site-packages/unstructured/file_utils/file_conversion.py", line 67, in convert_file_to_html_text_using_pandoc
return convert_file_to_text(
└ <function convert_file_to_text at 0x74d4b82c1760>
File "/usr/local/lib/python3.11/site-packages/unstructured/utils.py", line 216, in wrapper
return func(*args, **kwargs)
│ │ └ {'filename': '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - Lords and La...
│ └ ()
└ <function convert_file_to_text at 0x74d4b82c0d60>
File "/usr/local/lib/python3.11/site-packages/unstructured/file_utils/file_conversion.py", line 17, in convert_file_to_text
text = pypandoc.convert_file(filename, target_format, format=source_format)
│ │ │ │ └ 'epub'
│ │ │ └ 'html'
│ │ └ '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx (1994, H...
│ └ <function convert_file at 0x74d4445dee80>
└ <module 'pypandoc' from '/usr/local/lib/python3.11/site-packages/pypandoc/init.py'>
File "/usr/local/lib/python3.11/site-packages/pypandoc/init.py", line 206, in convert_file
return _convert_input(discovered_source_files, format, 'path', to, extra_args=extra_args,
│ │ │ │ └ ()
│ │ │ └ 'html'
│ │ └ 'epub'
│ └ PosixPath('/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx...
└ <function _convert_input at 0x74d4445df380>
File "/usr/local/lib/python3.11/site-packages/pypandoc/init.py", line 387, in _convert_input
input_file = sorted(input_file)
└ PosixPath('/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx...

TypeError: 'PosixPath' object is not iterable
2025-08-14 03:52:21.038 | ERROR | open_webui.routers.files:upload_file:192 - 400: 'PosixPath' object is not iterable
Traceback (most recent call last):

File "/app/backend/open_webui/routers/retrieval.py", line 1438, in process_file
docs = loader.load(
│ └ <function Loader.load at 0x74d506cc1b20>
└ <open_webui.retrieval.loaders.main.Loader object at 0x74d4443d2cd0>

File "/app/backend/open_webui/retrieval/loaders/main.py", line 218, in load
docs = loader.load()
│ └ <function BaseLoader.load at 0x74d5071e1440>
└ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>

File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 32, in load
return list(self.lazy_load())
│ └ <function UnstructuredBaseLoader.lazy_load at 0x74d5071e3060>
└ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 107, in lazy_load
elements = self._get_elements()
│ └ <function UnstructuredEPubLoader._get_elements at 0x74d506d114e0>
└ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/epub.py", line 55, in _get_elements
return partition_epub(filename=self.file_path, **self.unstructured_kwargs)
│ │ │ │ └ {}
│ │ │ └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>
│ │ └ '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx (1994, H...
│ └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0>
└ <function partition_epub at 0x74d4b82322a0>
File "/usr/local/lib/python3.11/site-packages/unstructured/partition/epub.py", line 48, in partition_epub
html_text = convert_file_to_html_text_using_pandoc(
└ <function convert_file_to_html_text_using_pandoc at 0x74d4b82c0ea0>
File "/usr/local/lib/python3.11/site-packages/unstructured/file_utils/file_conversion.py", line 67, in convert_file_to_html_text_using_pandoc
return convert_file_to_text(
└ <function convert_file_to_text at 0x74d4b82c1760>
File "/usr/local/lib/python3.11/site-packages/unstructured/utils.py", line 216, in wrapper
return func(*args, **kwargs)
│ │ └ {'filename': '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - Lords and La...
│ └ ()
└ <function convert_file_to_text at 0x74d4b82c0d60>
File "/usr/local/lib/python3.11/site-packages/unstructured/file_utils/file_conversion.py", line 17, in convert_file_to_text
text = pypandoc.convert_file(filename, target_format, format=source_format)
│ │ │ │ └ 'epub'
│ │ │ └ 'html'
│ │ └ '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx (1994, H...
│ └ <function convert_file at 0x74d4445dee80>
└ <module 'pypandoc' from '/usr/local/lib/python3.11/site-packages/pypandoc/init.py'>
File "/usr/local/lib/python3.11/site-packages/pypandoc/init.py", line 206, in convert_file
return _convert_input(discovered_source_files, format, 'path', to, extra_args=extra_args,
│ │ │ │ └ ()
│ │ │ └ 'html'
│ │ └ 'epub'
│ └ PosixPath('/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx...
└ <function _convert_input at 0x74d4445df380>
File "/usr/local/lib/python3.11/site-packages/pypandoc/init.py", line 387, in _convert_input
input_file = sorted(input_file)
└ PosixPath('/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx...

TypeError: 'PosixPath' object is not iterable

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 0x74d5559589a0>
└ <WorkerThread(AnyIO worker thread, started 128455081838272)>
File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x74d4b8696d40>
└ <WorkerThread(AnyIO worker thread, started 128455081838272)>
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 0x74d509066200>, user=UserModel(id='30d5e137-ad6b-4dbf-9610-6a5a7003e898', name='r...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x74d4b8c550c0>

File "/app/backend/open_webui/routers/files.py", line 183, in upload_file
process_file(request, ProcessFileForm(file_id=id), user=user)
│ │ │ │ └ UserModel(id='30d5e137-ad6b-4dbf-9610-6a5a7003e898', name='ren', email='no@example.com', role='admin', profile_image_url='dat...
│ │ │ └ '7cbacd0c-3230-4016-8eff-c851b5103be3'
│ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
│ └ <starlette.requests.Request object at 0x74d4442f0f90>
└ <function process_file at 0x74d506237240>

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

fastapi.exceptions.HTTPException: 400: 'PosixPath' object is not iterable
2025-08-14 03:52:21.040 | ERROR | open_webui.routers.files:upload_file:193 - Error processing file: 7cbacd0c-3230-4016-8eff-c851b5103be3
2025-08-14 03:52:21.041 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.16.0.11:61575 - "POST /api/v1/files/ HTTP/1.1" 200

Additional Information

No response

Originally created by @RenHoekNL on GitHub (Aug 14, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16603 ### 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.22 (latest) ### Ollama Version (if applicable) 0.11.4 ### Operating System Debian GNU/Linux 12 (bookworm) (docker) ### 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 **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 * Log in as admin on the web GUI * Click your profile icon (top-right) -> Admin Panel -> Settings -> Models * Select the llama model * Knowledge -> Upload Files * Pick a file and upload it Expected behaviour: File is uploaded ### Actual Behavior Web browser pops up message saying: 'PosixPath' object is not iterable The filename has brackets '[]' in it. When I copied the file, removed the backets from the name and uploaded it. It works fine. The fact that the brackets break the code, could indicate that somewhere user-input it interpreted. A possible security issue. ### Steps to Reproduce See above. Upload a file with brackets in the filename, e.g. "hello [world] today.txt" ### Logs & Screenshots 2025-08-14 03:52:21.003 | INFO | open_webui.routers.files:upload_file:95 - file.content_type: application/epub+zip 2025-08-14 03:52:21.037 | ERROR | open_webui.routers.retrieval:process_file:1519 - 'PosixPath' object is not iterable 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 0x74d5559589a0> └ <WorkerThread(AnyIO worker thread, started 128455081838272)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x74d4b8696d40> └ <WorkerThread(AnyIO worker thread, started 128455081838272)> 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 0x74d509066200>, user=UserModel(id='30d5e137-ad6b-4dbf-9610-6a5a7003e898', name='r... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x74d4b8c550c0> File "/app/backend/open_webui/routers/files.py", line 183, in upload_file process_file(request, ProcessFileForm(file_id=id), user=user) │ │ │ │ └ UserModel(id='30d5e137-ad6b-4dbf-9610-6a5a7003e898', name='ren', email='no@example.com', role='admin', profile_image_url='dat... │ │ │ └ '7cbacd0c-3230-4016-8eff-c851b5103be3' │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x74d4442f0f90> └ <function process_file at 0x74d506237240> > File "/app/backend/open_webui/routers/retrieval.py", line 1438, in process_file docs = loader.load( │ └ <function Loader.load at 0x74d506cc1b20> └ <open_webui.retrieval.loaders.main.Loader object at 0x74d4443d2cd0> File "/app/backend/open_webui/retrieval/loaders/main.py", line 218, in load docs = loader.load() │ └ <function BaseLoader.load at 0x74d5071e1440> └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 32, in load return list(self.lazy_load()) │ └ <function UnstructuredBaseLoader.lazy_load at 0x74d5071e3060> └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 107, in lazy_load elements = self._get_elements() │ └ <function UnstructuredEPubLoader._get_elements at 0x74d506d114e0> └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/epub.py", line 55, in _get_elements return partition_epub(filename=self.file_path, **self.unstructured_kwargs) │ │ │ │ └ {} │ │ │ └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> │ │ └ '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx (1994, H... │ └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> └ <function partition_epub at 0x74d4b82322a0> File "/usr/local/lib/python3.11/site-packages/unstructured/partition/epub.py", line 48, in partition_epub html_text = convert_file_to_html_text_using_pandoc( └ <function convert_file_to_html_text_using_pandoc at 0x74d4b82c0ea0> File "/usr/local/lib/python3.11/site-packages/unstructured/file_utils/file_conversion.py", line 67, in convert_file_to_html_text_using_pandoc return convert_file_to_text( └ <function convert_file_to_text at 0x74d4b82c1760> File "/usr/local/lib/python3.11/site-packages/unstructured/utils.py", line 216, in wrapper return func(*args, **kwargs) │ │ └ {'filename': '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - Lords and La... │ └ () └ <function convert_file_to_text at 0x74d4b82c0d60> File "/usr/local/lib/python3.11/site-packages/unstructured/file_utils/file_conversion.py", line 17, in convert_file_to_text text = pypandoc.convert_file(filename, target_format, format=source_format) │ │ │ │ └ 'epub' │ │ │ └ 'html' │ │ └ '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx (1994, H... │ └ <function convert_file at 0x74d4445dee80> └ <module 'pypandoc' from '/usr/local/lib/python3.11/site-packages/pypandoc/__init__.py'> File "/usr/local/lib/python3.11/site-packages/pypandoc/__init__.py", line 206, in convert_file return _convert_input(discovered_source_files, format, 'path', to, extra_args=extra_args, │ │ │ │ └ () │ │ │ └ 'html' │ │ └ 'epub' │ └ PosixPath('/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx... └ <function _convert_input at 0x74d4445df380> File "/usr/local/lib/python3.11/site-packages/pypandoc/__init__.py", line 387, in _convert_input input_file = sorted(input_file) └ PosixPath('/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx... TypeError: 'PosixPath' object is not iterable 2025-08-14 03:52:21.038 | ERROR | open_webui.routers.files:upload_file:192 - 400: 'PosixPath' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 1438, in process_file docs = loader.load( │ └ <function Loader.load at 0x74d506cc1b20> └ <open_webui.retrieval.loaders.main.Loader object at 0x74d4443d2cd0> File "/app/backend/open_webui/retrieval/loaders/main.py", line 218, in load docs = loader.load() │ └ <function BaseLoader.load at 0x74d5071e1440> └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 32, in load return list(self.lazy_load()) │ └ <function UnstructuredBaseLoader.lazy_load at 0x74d5071e3060> └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 107, in lazy_load elements = self._get_elements() │ └ <function UnstructuredEPubLoader._get_elements at 0x74d506d114e0> └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/epub.py", line 55, in _get_elements return partition_epub(filename=self.file_path, **self.unstructured_kwargs) │ │ │ │ └ {} │ │ │ └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> │ │ └ '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx (1994, H... │ └ <langchain_community.document_loaders.epub.UnstructuredEPubLoader object at 0x74d4b8b378d0> └ <function partition_epub at 0x74d4b82322a0> File "/usr/local/lib/python3.11/site-packages/unstructured/partition/epub.py", line 48, in partition_epub html_text = convert_file_to_html_text_using_pandoc( └ <function convert_file_to_html_text_using_pandoc at 0x74d4b82c0ea0> File "/usr/local/lib/python3.11/site-packages/unstructured/file_utils/file_conversion.py", line 67, in convert_file_to_html_text_using_pandoc return convert_file_to_text( └ <function convert_file_to_text at 0x74d4b82c1760> File "/usr/local/lib/python3.11/site-packages/unstructured/utils.py", line 216, in wrapper return func(*args, **kwargs) │ │ └ {'filename': '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - Lords and La... │ └ () └ <function convert_file_to_text at 0x74d4b82c0d60> File "/usr/local/lib/python3.11/site-packages/unstructured/file_utils/file_conversion.py", line 17, in convert_file_to_text text = pypandoc.convert_file(filename, target_format, format=source_format) │ │ │ │ └ 'epub' │ │ │ └ 'html' │ │ └ '/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx (1994, H... │ └ <function convert_file at 0x74d4445dee80> └ <module 'pypandoc' from '/usr/local/lib/python3.11/site-packages/pypandoc/__init__.py'> File "/usr/local/lib/python3.11/site-packages/pypandoc/__init__.py", line 206, in convert_file return _convert_input(discovered_source_files, format, 'path', to, extra_args=extra_args, │ │ │ │ └ () │ │ │ └ 'html' │ │ └ 'epub' │ └ PosixPath('/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx... └ <function _convert_input at 0x74d4445df380> File "/usr/local/lib/python3.11/site-packages/pypandoc/__init__.py", line 387, in _convert_input input_file = sorted(input_file) └ PosixPath('/app/backend/data/uploads/7cbacd0c-3230-4016-8eff-c851b5103be3_xxx - [xxx 14] - xxx... TypeError: 'PosixPath' object is not iterable 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 0x74d5559589a0> └ <WorkerThread(AnyIO worker thread, started 128455081838272)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x74d4b8696d40> └ <WorkerThread(AnyIO worker thread, started 128455081838272)> 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 0x74d509066200>, user=UserModel(id='30d5e137-ad6b-4dbf-9610-6a5a7003e898', name='r... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x74d4b8c550c0> > File "/app/backend/open_webui/routers/files.py", line 183, in upload_file process_file(request, ProcessFileForm(file_id=id), user=user) │ │ │ │ └ UserModel(id='30d5e137-ad6b-4dbf-9610-6a5a7003e898', name='ren', email='no@example.com', role='admin', profile_image_url='dat... │ │ │ └ '7cbacd0c-3230-4016-8eff-c851b5103be3' │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x74d4442f0f90> └ <function process_file at 0x74d506237240> File "/app/backend/open_webui/routers/retrieval.py", line 1526, in process_file raise HTTPException( └ <class 'fastapi.exceptions.HTTPException'> fastapi.exceptions.HTTPException: 400: 'PosixPath' object is not iterable 2025-08-14 03:52:21.040 | ERROR | open_webui.routers.files:upload_file:193 - Error processing file: 7cbacd0c-3230-4016-8eff-c851b5103be3 2025-08-14 03:52:21.041 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.16.0.11:61575 - "POST /api/v1/files/ HTTP/1.1" 200 ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-19 23:52:39 -05:00
Author
Owner

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

Could you share the file with us?

<!-- gh-comment-id:3194007579 --> @tjbck commented on GitHub (Aug 17, 2025): Could you share the file with us?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#17973