Skip to main content
For the HTTP status codes the API returns, see Errors.

Index creation errors

Missing spec argument

Python SDK versions 3.0.0 to 9.x require a spec argument in create_index(). Pass one to set the index’s cloud and region:
Python
In Python SDK 10, spec is optional and new indexes default to AWS us-east-1. For current syntax, see Create an index.

Serverless index limit reached

The API returns this with status 403 when the project already has as many serverless indexes as your plan allows. For the limit on each plan, see Object limits. To fix it, do one of the following:

Outdated Python SDK errors

These errors come from code written for Python SDK versions earlier than 3.0.0, or from having the deprecated pinecone-client package installed.

Pinecone has no attribute init

In Python SDK 5.0.0 and later, the message reads:
The code calls pinecone.init(), which was removed in version 3.0.0. Create a client instance instead. It doesn’t take an environment, only an API key:
Python
The same applies to other former top-level functions, such as pinecone.create_index() and pinecone.list_indexes(). Call them on the client instance instead.

Cannot import name Pinecone

The installed SDK is earlier than 3.0.0, or the deprecated pinecone-client package is installed alongside pinecone. The Python SDK package was renamed from pinecone-client to pinecone, and having both installed causes conflicts. Remove the old package and upgrade:
Shell

Controller hostname not found

SDK versions earlier than 3.0.0 send requests to environment-specific controller hostnames. Current SDKs use https://api.pinecone.io. Upgrade the SDK, then update your code as described in Pinecone has no attribute init:
Shell