My pinecone index not accessible after migration to serverless

Was requested to migrate to serverless within 7 days or face interruption to my starter index.

Just successfully migrated and update my python scripts with the new index name and region. But my app deployed to streamlit from Github is not able connect to my index.

Am I missing anything here? Or any setting to deploy to streamlit on top of the new Region and Index Name?

Thanks.

Hi @kian_ping_chng,

Are you able to share any error that you’re seeing? Can you open any logs to get a more verbose stack trace?

Best,
Zack

The advice from support is that serverless can only connect with Pinecone 3.0.0 and above. Once I upgraded the pinecone version to 3.0.0 and above, will get the following errors.

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

Please create an instance of the Pinecone class instead.

Example:

import os
from pinecone import Pinecone, ServerlessSpec

pc = Pinecone(
    api_key=os.environ.get("PINECONE_API_KEY")
)

# Now do stuff
if 'my_index' not in pc.list_indexes().names():
    pc.create_index(
        name='my_index', 
        dimension=1536, 
        metric='euclidean',
        spec=ServerlessSpec(
            cloud='aws',
            region='us-west-2'
        )
    )

Been getting help from fellow python programmers to resolve the coding issue but it still giving errors. All my chatbots are down for weeks. Going to migrate out of pinecone for good.