AttributeError: type object 'Pinecone' has no attribute 'from_existing_index'

AttributeError: type object ‘Pinecone’ has no attribute ‘from_existing_index’, how to resolve this error already checked the solution available for Pinecone.from_text still getting same error

Hi @ayushsingh00112233, please share how you import Pinecone and Langchain’s PineconeVectorStore class.

For reference, your imports should be as follows:

from pinecone import Pinecone
from langchain_pinecone import PineconeVectorStore
1 Like

Hey ayush. I was facing similar problem, the solution to this is using PineconeVectorStore class instead of Pinecone to get existing Indexes.

zeke has already provided you with the import statements. If you face any errors downloading the packages i recently posted a solution to that , you can check it here.

feel free to ask anything.
hope it helps

2 Likes

i have tried importing PineconeVectorStore but still facing some issues…

 AttributeError: type object 'Pinecone' has no attribute 'from_existing_index'

What version of langchain_pinecone are you using?

i’m using langchain-pinecone 0.1.1
But i have solved this error by creating an object of pinecone class.
And now i’m stuck elsewhere…can you please help me ?

I am working on a project HealthCare Chatbot, where i have used a medical book ( pdf file ) THE GALE ENCYCLOPAEDIA OF MEDICINE and made text chunks out of it…then used embedding model to embed the text chunks and then uploaded it to pinecone…there were 7020 vectors and all were uploaded successfully
But when i tried to perform similarity search using a query " what are allergies"
There came an error that the last query vector had some issue. And now i’m not able to fetch data from pinecone.

@220221447 I am doing the same project now and I am facing the same error, how did you resolved the error. Please let me know…