Pinecone-client update broke legacy chatbot using pinecone Vectorstores

Have a legacy chatbot that was working fine… last night installed canopy and deployed a test DB as per James’s intro and worked great. This AM in my old bot now getting the error that pinecone.init( is deprecated:

AttributeError: init is no longer a top-level attribute of the pinecone package.

Please create an instance of the Pinecone class instead.

I am not sure whether this is something on the account settings , dependencies or what but need a little help! Note the canopy install was done on a different machine and venv so that’s what makes me think something on the pinecone client account setup is the culprit.

EDIT: confirmed this appears to be an upgraded dependency after testing with an old version of the connector, at this point seems best to just try and update all dependencies and go with the new API call


your EDIT is on point

I think that pip did not update the pinecone client version, try to use the the -U flag when installing

let us know if that helped!

ok I recall now why; I backed out the upgrade because I could not get past this error…I have -U’d everything including langchain_community OpenAi and pinecone-client now but stuck here:

pc = Pinecone(api_key=pinecone_api_key)
TypeError: Pinecone.init() got an unexpected keyword argument ‘api_key’.

When I remove it and call the plain class without an api argument I get:
Pinecone.init() missing 3 required positional arguments: ‘index’, ‘embedding’, and ‘text_key’ which does not match at all the new specs I find for creating a new Pinecone client… confirmed pinecone version running after upgrade “pip show” is:
Name: pinecone-client
Version: 3.0.1
Summary: Pinecone client and SDK

Narrowed this to being a conflict between the Pinecone and Langchain imports:
from langchain_community.vectorstores import Pinecone and appears to be a gap between the pinecone-client update and the langchain dev catching up. Still leaves me stuck however or else in a spot to ditch langchain… hoping someone else has upgraded Pinecone and dealt with this ?

versions are as follows:
pinecone-client 3.0.1
langchain-community 0.0.14
langchain-core 0.1.15

EDIT: Solved here but just FYI for anyone else this requires a work around for langchain - post on reddit got me past from langchain_community.vectorstores import Pinecone as pcvs and that was followed by a retrofitting of both openAi and langchain code changes to match new api calls…tooks me the better part of a day to upgrade all libraries then change openai completion messages to match new completion calls

1 Like

On the same boat here… I opened up an issue with langchain to address this earlier today.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.