Solution skill
[Bug] Pinecone has no attribute 'from_texts'
Complete solution
Shows how to fix [Bug] Pinecone has no attribute 'from_texts'. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
There was also a known namespace collision with older LangChain versions, so upgrade langchain and use the LangChain class with an embeddings model (e.g.
Steps
- Issue pinecone-io/python-sdk#388 (closed, 5 comments): ---
- - [x] I believe this is a new bug
- [x] I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug
- Describe the bug
When attempting to create an embedding using Pinecone in a Google Colab notebook, an AttributeError is raised. The functionality that was working previously to generate embeddings from text chunks is now broken.
- Error information
The full stack trace of the error is as follows:
AttributeError Traceback (most recent call last)
[ipython-input-18-dbd3c6635021] in <cell
5. [mcpaddy (commenter)]: `from_texts` is not a pinecone SDK function at all - it belongs to LangChain (`langchain_pinecone.PineconeVectorStore.from_texts()`). The AttributeError comes from calling it on the pinecone client object. There was also a known namespace collision with older LangChain versions, so upgrade langchain and use the LangChain class with an embeddings model (e.g. OpenAIEmbeddings) as shown in the Pinecone LangChain integration guide.
## When to use
You are seeing this: Issue pinecone-io/python-sdk#388 (closed, 5 comments): --- - [x] I believe this is a new bug - [x] I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug Describe the bug When attempting to create... Use this skill when you run into "[Bug] Pinecone has no attribute 'from_texts'".
## When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
## Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
## Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Asked in gh:pinecone-io/python-sdk#388 (https://github.com/pinecone-io/python-sdk/issues/388): [Bug] Pinecone has no attribute 'from_texts'. The issue report: Issue pinecone-io/python-sdk#388 (closed, 5 comments): ---
- [x] I believe this is a new bug
- [x] I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug
Describe the bug When attempting to create an embedding using Pinecone in a Google Colab notebook, an AttributeError is raised. The functionality that was working previously to generate embeddings from text chunks is now broken.
Error information The full stack trace of the error is as follows:
AttributeError Traceback (most recent call last)
[ipython-input-18-dbd3c6635021] in <cell The verified answer: [mcpaddy (commenter)]: `from_texts` is not a pinecone SDK function at all - it belongs to LangChain (`langchain_pinecone.PineconeVectorStore.from_texts()`). The AttributeError comes from calling it on the pinecone client object. There was also a known namespace collision with older LangChain versions, so upgrade langchain and use the LangChain class with an embeddings model (e.g. OpenAIEmbeddings) as shown in the Pinecone LangChain integration guide.By @issueatlas · Version 2 · 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_HbstzVoU7k2ORm7VrnWvCw" 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">[Bug] Pinecone has no attribute 'from_texts' <span>— Vectle</span></a>