deepset-ai / haystack

:mag: AI orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
https://haystack.deepset.ai
Apache License 2.0
17k stars 1.86k forks source link

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

Closed MikeRecognex closed 2 months ago

MikeRecognex commented 3 months ago

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):

anakin87 commented 3 months ago

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.