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

from haystack.components.converters import PDFMinerToDocument ImportError: cannot import name 'PDFMinerToDocument' from 'haystack.components.converters' #7916

Open
MikeRecognex opened this issue Jun 23, 2024 · 1 comment

Comments

@MikeRecognex
Copy link

MikeRecognex commented Jun 23, 2024

Describe the bug
As per the instructions at https://docs.haystack.deepset.ai/docs/pdfminertodocument I have installed pdfminer.six using pip install pdfminer.six

I am importing the library as follows in my code (also per instructions)
from haystack.components.converters import PDFMinerToDocument
The error message I receive is:

Traceback (most recent call last):
File "/Users/michaeldoyle/Scratch/Streamlit/NetworkHTMLtoMongoPDFERRORS.py", line 15, in
from haystack.components.converters import PDFMinerToDocument
ImportError: cannot import name 'PDFMinerToDocument' from 'haystack.components.converters' (/Users/michaeldoyle/Scratch/Streamlit/haystack_env/lib/python3.9/site-packages/haystack/components/converters/init.py)

To Reproduce
I have tried running the example in https://docs.haystack.deepset.ai/docs/pdfminertodocument and get same error.

Describe your environment (please complete the following information):

  • Mac Sonoma, M1 Pro

  • Haystack version: haystack-ai 2.0.1
    haystack-bm25 1.0.2
    haystack-pydoc-tools 0.2.0

  • Integration version: pdfminer.six 20231228

@anakin87 anakin87 transferred this issue from deepset-ai/haystack-core-integrations Jun 24, 2024
@anakin87
Copy link
Member

Hey!

PDFMinerToDocument was not available in Haystack 2.0.1.
The import works correctly with Haystack 2.2.3.

Please update the package (pip install -U haystack-ai) and let us know.

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

No branches or pull requests

2 participants