HTTP status codes
Pinecone uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided, and codes in the 5xx range indicate an error with Pinecone’s servers.
200 - OK
The request succeeded.201 - CREATED
The request succeeded and a new resource was created.202 - ACCEPTED
The request was accepted, but the operation isn’t complete yet. For example, deleting an index returns202 while the deletion is still in progress.
204 - NO CONTENT
The request succeeded, and there’s no response body to return.400 - INVALID ARGUMENT
The request failed due to an invalid argument.401 - UNAUTHENTICATED
The request failed due to a missing or invalid API key.402 - PAYMENT REQUIRED
The request failed due to delinquent payment or account deactivation for non-payment. See Account deactivation for non-payment.403 - FORBIDDEN
The request failed due to an exceeded quota or index deletion protection.404 - NOT FOUND
The request failed because the resource was not found.409 - ALREADY EXISTS
The request failed because the resource already exists.412 - FAILED PRECONDITIONS
The request failed due to preconditions not being met.422 - UNPROCESSABLE ENTITY
The request failed because the server was unable to process the contained instructions.429 - TOO MANY REQUESTS
The request was rate-limited. Implement retry logic with exponential backoff to handle this error.500 - UNKNOWN
An internal server error occurred. Implement retry logic with exponential backoff to handle transient errors.502 - BAD GATEWAY
The API gateway received an invalid response from a backend service. This is typically a temporary error. Implement retry logic with exponential backoff to handle transient errors.503 - UNAVAILABLE
The server is currently unavailable. Implement retry logic with exponential backoff to handle transient errors.504 - GATEWAY TIMEOUT
The API gateway did not receive a timely response from the backend server. This can occur due to slow requests or backend processing delays. Implement retry logic with exponential backoff to handle transient errors.Index creation errors
Missing spec argument
spec argument in create_index(). Pass one to set the index’s cloud and region:
Python
spec is optional and new indexes default to AWS us-east-1. For current syntax, see Create an index.
Serverless index limit reached
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:
- Delete indexes you no longer need.
- Store data in namespaces within one index instead of creating separate indexes.
- Upgrade your plan.
Outdated Python SDK errors
These errors come from code written for Python SDK versions earlier than 3.0.0, or from having the deprecatedpinecone-client package installed.
Pinecone has no attribute init
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
pinecone.create_index() and pinecone.list_indexes(). Call them on the client instance instead.
Cannot import name Pinecone
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
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