Common errors
This page helps you understand and resolve common Pinecone errors.
Client connection errors
Cannot import name Pinecone
from pinecone
When using an older version of the Python client (earlier than 3.0.0), trying to import the Pinecone
class raises the following error:
Upgrade the client version and try again:
No attribute init
When using Python client version 3.0.0 and later, trying to initialize a client using pinecone.init(api_key='XXX, environment='XXX')
raises the following error:
To initialize the client, import and use the Pinecone
class instead:
Using an outdated client with a serverless index
Trying to connect to a serverless index with an outdated Pinecone client (earlier than 3.0.0 for Python, earlier than 2.0.0 for Node.js) will raise errors similar to one of the following:
To connect to a serverless index, upgrade to the latest Python or Node.js client and try again:
Index creation errors
Missing spec
parameter
Using the new API, creating an index requires passing appropriate values into the spec
parameter. Without this spec
parameter, the create_index
method raises the following error:
For guidance on how to set this parameter, see Create a serverless index and Create a pod-based index.
Project contains max serverless indexes
Each project is limited to 20 serverless indexes. Trying to create more than 20 serverless indexes in a project raises the following 403 (FORBIDDEN)
error:
Delete any unused serverless indexes in the project and try again, or create a new project to hold additional serverless indexes.
Also consider using namespaces to partition vectors of the same dimensionality within a single index. Namespaces can help speed up queries as well as comply with multi-tenancy requirements.