I've got this error that I don't understand using llama-index and pinecone vector storage

Hi guy’s, I’m new using pinecone and I’m wanted to switch from supabase to pinecone for my RAG app. But I’ve used a simple example notebook from here : “Google Colab
And I’ve got this error “cannot access local variable ‘pinecone_sparse_vector’ where it is not associated with a value”

I’m absolutely don’t understand why I’ve got that and to solve it

Please check to make sure your API key is valid You can test this by:

  • Creating a new API key in the Pinecone console
  • Initialize your client with the API key:

python

from pinecone.grpc import PineconeGRPC as Pineconefrom pinecone import ServerlessSpec
pc = Pinecone(api_key='YOUR_API_KEY')

Make sure to: