bug/<partition returns empty output and exits with code 0>
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-engineering
Research direction
Run the provided reproduction with example-docs/pdf/embedded-images.pdf and inspect the unstructured.partition.auto.partition entry point to trace how the PDF is handled. Compare the result with text-only and image-containing PDFs; done means the example produces the expected extracted elements instead of silently returning no output.
Written by the indexing model from the issue text.
Description
Describe the bug
When using the partition function from unstructured.partition.auto to process a PDF file (embedded-images.pdf), the program finishes execution with exit code 0 but produces no output. Expected behavior is to see extracted content printed, but there's nothing returned.
To Reproduce
code:
from unstructured.partition.auto import partition
elements = partition("./example-docs/pdf/embedded-images.pdf")
print("\n\n".join([str(el) for el in elements]))
Ensure the ./example-docs/pdf/embedded-images.pdf file exists and is accessible.
Run the script. Observe that there's no output, and the process exits with code 0.
Expected behavior
The partition function should extract content (text, image metadata, etc.) from the PDF and the print statement should output the joined string representation of the extracted elements, showing relevant information like text blocks, image details, etc.
Additional context
Tried with different PDF files (simple text-only PDFs, other PDFs with images) and got the same silent exit with code 0 result in some cases, which makes me think there might be an issue with the partition function's handling of certain PDF structures or a potential bug in the auto-partition logic.
- Dominant language
- HTML
- Stars
- 15.8k
- Forks
- 1.4k
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 40
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Unstructured-IO/unstructured
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Unstructured-IO/unstructured#4876 ·
Maintainers usually reply within 6 days
-
bug: partition_email() raises io.UnsupportedOperation on a file-like object that cannot seekPossibly taken @Bensonluo claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Unstructured-IO/unstructured#4864 ·
Maintainers usually reply within 6 days
-
fix(nlp): match single-letter bullets in the enumerated bullet patternPossibly taken @Eapp1e claimed this 33 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Unstructured-IO/unstructured#4635 ·
Maintainers usually reply within 6 days
-
bug(cleaners): translate_text passes text instead of chunk in attention window loopPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Unstructured-IO/unstructured#4558 · 1 comment ·
Maintainers usually reply within 6 days
-
extract_text_before/extract_text_after raise UnboundLocalError when the pattern is absentPossibly taken @ayam04 claimed this 103 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Unstructured-IO/unstructured#4427 · 3 comments ·
Maintainers usually reply within 6 days
All issues in Unstructured-IO/unstructured
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
fairagro/m4.2_sql_to_arc#388 ·
Maintainers usually reply within 1 day
-
Add: FAP TV Gay FeedOpencheck:failed feeds:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
iptv-org/database#40182 · 1 comment ·
Maintainers usually reply within 1 day
-
copilot-metrics
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area: explore bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
nplhse/collaborative-ivena-statistics#2107 ·
Maintainers usually reply within 1 day