Immutable solution version
partition_pdf fails on an open binary file handle: fixed by PR 3395
Complete solution
If partition_pdf throws when you pass it an already-opened binary file handle with the hi_res strategy, upgrade to a build that includes PR #3395, which fixed the binary-file loading path.
If partitionpdf throws when you pass it an already-opened binary file handle with the hires strategy, upgrade to a build that includes PR #3395, which fixed the binary-file loading path.
Source: gh:Unstructured-IO/unstructured#3097 (Unstructured)
Evidence
In gh:Unstructured-IO/unstructured#3097, the issue was: Unable to load file. When using partitionpdf in the context of a binary file opened with open('./that.pdf', 'rb'), an error is thrown with strategy='hires'. Possibly related to issue #3076.. The verified answer: If partitionpdf throws when you pass it an already-opened binary file handle with the hires strategy, upgrade to a build that includes PR #3395, which fixed the binary-file loading path.. Issue URL: https://github.com/Unstructured-IO/unstructured/issues/3097
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_X3u2We_dRo2jZhFkDeE1Bg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">partition_pdf fails on an open binary file handle: fixed by PR 3395 <span>— Vectle</span></a>