Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

❗️ v0.3.11 is broken #9

Closed
lsorber opened this issue Oct 8, 2024 · 1 comment
Closed

❗️ v0.3.11 is broken #9

lsorber opened this issue Oct 8, 2024 · 1 comment

Comments

@lsorber
Copy link

lsorber commented Oct 8, 2024

The new v0.3.11 release seems to be broken. Minimal reproducible example (e.g., in a Google Colab):

%pip install --quiet pdftext==0.3.11

from pathlib import Path
from pdftext.extraction import dictionary_output

pages = dictionary_output(Path("specrel.pdf"), sort=True, keep_chars=False)

Output:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-2-783804a94b7a>](https://localhost:8080/#) in <cell line: 4>()
      2 from pdftext.extraction import dictionary_output
      3 
----> 4 pages = dictionary_output(Path("specrel.pdf"), sort=True, keep_chars=False)

2 frames
[/usr/local/lib/python3.10/dist-packages/pdftext/extraction.py](https://localhost:8080/#) in _load_pdf(pdf, flatten_pdf)
     17 
     18     if not isinstance(pdf, pdfium.PdfDocument):
---> 19         raise TypeError("pdf must be a file path string or a PdfDocument object")
     20 
     21     # Must be called on the parent pdf, before the page was retrieved

TypeError: pdf must be a file path string or a PdfDocument object
@VikParuchuri
Copy link
Owner

Fix is out (v0.3.12), thanks for the catch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants