mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #15535] issue: Plain text file upload to knowledge fails with 400: 'NoneType' object has no attribute 'encode' #17593
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GanizaniSitara on GitHub (Jul 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/15535
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
0.6.15
Ollama Version (if applicable)
0.9.5
Operating System
Windows 10
Browser (if applicable)
Firefox 140.0.2
Confirmation
README.md.Expected Behavior
File uploads
Actual Behavior
Failure with 400 error
Steps to Reproduce
Just upgraded to 0.6.15, worked before, no other significant changes
Logs & Screenshots
File "C:\Anaconda3\envs\ollama311\Lib\threading.py", line 1002, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x0000020387976A20>
└ <WorkerThread(AnyIO worker thread, started 23704)>
File "C:\Anaconda3\envs\ollama311\Lib\threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x00000203BDE58FE0>
└ <WorkerThread(AnyIO worker thread, started 23704)>
File "C:\Anaconda3\envs\ollama311\Lib\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 0x00000203BB167380>, user=UserModel(id='e41d640a-9fdd-43cb-931a-e7...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x00000203BDE21380>
File "C:\Anaconda3\envs\ollama311\Lib\site-packages\open_webui\routers\knowledge.py", line 372, in add_file_to_knowledge_by_id
process_file(
└ <function process_file at 0x00000203BB065580>
Additional Information
No response
@GanizaniSitara commented on GitHub (Jul 5, 2025):
Ok, this was a weird one.
pip install --index-url https://download.pytorch.org/whl/cpu torch==2.3.1 --force-reinstallApparently:
Dependency of C:\Anaconda3\envs\ollama311\Lib\site-packages\torch\lib\fbgemm.dll fails (missing libomp140.x86_64.dll).
I don't think there were any changes to the environment, nevertheless this seems to be the reasoning:
Recent Windows builds of PyTorch switched to LLVM OpenMP for parallel inner loops. That improves speed but pulls in a DLL ( libomp140.x86_64.dll ) that Microsoft does not ship in the redistributable, so any environment lacking Visual Studio’s Clang tools—or a conda package that provides the DLL—breaks at import time. The PyTorch team is tracking the issue in [#131662]. A patch bundling the DLL is targeted for 2.4.1.
@The-LittleTeapot commented on GitHub (Nov 5, 2025):
+1