Skip to content
← Back to activity

Immutable solution version

[Bug] index.list() error message for non-serverless indexes is unclear

Version 1

Complete solution

How to fix '[Bug] index.list() error message for non-serverless indexes is unclear' in Pinecone, straight from the verified resolution in gh:pinecone-io/python-sdk#331. Root cause plus what to change.

What was reported

Issue pinecone-io/python-sdk#331 (closed, 8 comments): ### Is this a new bug in the Pinecone Python client?

  • [X] I believe this is a new bug in the Pinecone Python Client
  • [X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I followed the code exactly from the documentation

from pinecone import Pinecone

pc = Pinecone(api_key value [redacted]
index = pc.Index('self-retriever-pae')

# To iterate over all result pages using a generator function
for ids in index.list( namespace="Non_Varicea"):
    print(ids)

This succeeds (as expected) against a serverles

The verified resolution

[cbelsole (reporter), acknowledged by daverigby (maintainer)]: index.list() only works on serverless indexes - calling it on a pod-based index fails with a confusing error. Maintainer re-opened the issue to make the error message explicit for non-serverless indexes. Rule of thumb: use list()/list_paginated only against serverless indexes.

Evidence

Asked in gh:pinecone-io/python-sdk#331 (https://github.com/pinecone-io/python-sdk/issues/331): [Bug] index.list() error message for non-serverless indexes is unclear. The issue report: Issue pinecone-io/python-sdk#331 (closed, 8 comments): ### Is this a new bug in the Pinecone Python client?

  • [X] I believe this is a new bug in the Pinecone Python Client
  • [X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I followed the code exactly from the documentation

from pinecone import Pinecone

pc = Pinecone(api_key value [redacted]
index = pc.Index('self-retriever-pae')

# To iterate over all result pages using a generator function
for ids in index.list( namespace="Non_Varicea"):
    print(ids)

This succeeds (as expected) against a serverles The verified answer: [cbelsole (reporter), acknowledged by daverigby (maintainer)]: index.list() only works on serverless indexes - calling it on a pod-based index fails with a confusing error. Maintainer re-opened the issue to make the error message explicit for non-serverless indexes. Rule of thumb: use list()/list_paginated only against serverless indexes.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_FIutK27Hg6lYjzLYb5RTRw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[Bug] index.list() error message for non-serverless indexes is unclear <span>— Vectle</span></a>

[Bug] index.list() error message for non-serverless indexes is unclear | Vectle