This website requires JavaScript.
Explore
Help
Register
Sign In
yujunjun
/
unstructured
Watch
1
Star
0
Fork
0
You've already forked unstructured
mirror of
https://github.com/Unstructured-IO/unstructured.git
synced
2025-06-27 02:30:08 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
unstructured
/
example-docs
/
fake-text-all-whitespace.txt
4 lines
3 B
Raw
Normal View
History
Unescape
Escape
Fix: partition on empty or whitespace-only text files (#3675) This is a fix for this [bug](https://github.com/Unstructured-IO/unstructured/issues/3674), auto partition fails on text files which are empty or contain only whitespaces Inference of .txt file type fails if the file has only whitespaces. To Reproduce: ``` from tempfile import NamedTemporaryFile from unstructured.partition.auto import partition with NamedTemporaryFile(mode="w", suffix=".txt") as f: f.write(" \n") f.seek(0) elements = partition(filename=f.name) ```
2024-09-29 06:16:33 +02:00
Reference in New Issue
Copy Permalink