You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AttributeError: module 'pinecone' has no attribute 'init'
Expected Behavior
Previously the same code was perfectly running in the Google Colab with no issue. But, today suddenly this issue arrived.
Methods Tried:
When further researching, some searches suggested re-installing the pinecone-client, and installing the v3.0.0, but none of the solutions worked.
Yes, the .init() method is no longer used in v3.0.0. Instead you should instantiate a client instance like this:
from pinecone import Pinecone
pc = Pinecone(api_key='YOUR_API_KEY')
# Now do stuff
pc.describe_index('my_index')
This approach encapsulates configuration state in the class instance so that people can work with multiple pinecone projects from the same app, if they wish.
I'm going to try to add some better warning messages to help give better guidance on the necessary migration.
Current Behavior
I have Pinecone upgraded to v3.0.0 and also installed the GRPC client.
When I run the following command:
pinecone.init(api_key="API_KEY", environment="ENV")
I get the following error:
AttributeError: module 'pinecone' has no attribute 'init'
Expected Behavior
Previously the same code was perfectly running in the Google Colab with no issue. But, today suddenly this issue arrived.
Methods Tried:
When further researching, some searches suggested re-installing the pinecone-client, and installing the v3.0.0, but none of the solutions worked.
Environment
The text was updated successfully, but these errors were encountered: