Unstructured-IO / Unstructured-IO/unstructured

bug/import partition_pdf must use onnxruntime?

Open
#3,981 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
15.5k
Forks
1.3k
Avg merge
4d 2h
Merged PRs (30d)
13

Description

Describe the bug

from unstructured.partition.pdf import partition_pdf


if name == "main":

 txt = partition_pdf(filename=r'E:\ideaproj\test_doc\test_pdf\test_pdf_01.pdf', strategy='fast')

 print(txt)

my strategy='fast'
Here is the translated content:

I don't need it, but whenever I from unstructured.partition.pdf import partition_pdf,
it raises
File "D:\anaconda3\envs\mytest-llamaindex\Lib\site-packages\onnxruntime\capi_pybind_state.py", line 32, in
from .onnxruntime_pybind11_state import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing onnxruntime_pybind11_state: A dynamic link library (DLL) initialization routine failed.

To Reproduce
Provide a code snippet that reproduces the issue.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment Info
Please run python scripts/collect_env.py and paste the output here.
This will help us understand more about the environment in which the bug occurred.

Additional context
Add any other context about the problem here.

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 reproducing the import from unstructured.partition.pdf with the reported strategy='fast' example. Run python scripts/collect_env.py to capture the missing environment details and inspect the import path involved in the onnxruntime DLL failure. Done means the expected PDF partitioning import behavior is verified without the reported initialization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.