Unstructured-IO / Unstructured-IO/unstructured-api

Version 0.0.71 breaks ocr_only pdf recognition on some documents

Open
#485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
951
Forks
192
Avg merge
7d 8h
Merged PRs (30d)
2

Description

Describe the bug
Starting with version 0.0.71 ocr_only pdf processing of some documents yields an empty result. Exactly the same code works fine with version 0.0.70.

To Reproduce

  1. docker run --platform linux/x86_64 -p 8000:8000 -d --rm --name unstructured-api downloads.unstructured.io/unstructured-io/unstructured-api:0.0.71
curl -X 'POST' \
  'http://127.0.0.1:8000/general/v0/general' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'files=@4.pdf' \
  -F 'strategy=ocr_only' \
  -F 'languages=deu'
  1. Now pull version 0.0.70 and try the same. In the first case the result is empty, in the second the result is correct and non-empty.
  • Filetype: PDF
  • Any additional API parameters: -

Environment:

  • self-hosted API
  • any client yields the same result

Additional context
Attaching the problematic PDF.
4.pdf

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the supplied Docker commands against the attached 4.pdf with strategy=ocr_only and languages=deu, comparing versions 0.0.71 and 0.0.70. Trace the PDF processing path to identify the regression; done means the document produces a non-empty result on 0.0.71 while preserving the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.