Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] pinecone.core.openapi.shared.exceptions.PineconeApiAttributeError: FetchResponse has no attribute '0' at ['['received_data']'] #429

Open
1 of 2 tasks
peterkarman1 opened this issue Jan 9, 2025 · 0 comments
Labels
bug Something isn't working status:needs-triage An issue that needs to be triaged by the Pinecone team

Comments

@peterkarman1
Copy link

peterkarman1 commented Jan 9, 2025

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug

Describe the bug
When using index.fetch, I receive

pinecone.core.openapi.shared.exceptions.PineconeApiAttributeError: FetchResponse has no attribute '0' at ['['received_data']']

Error information

Traceback (most recent call last):
  File "/Users/peterkarman/git/DryRunSec/random_scripts/pinecone-finder/get_summaries_for_pr.py", line 26, in <module>
    for v in index.fetch(test, namespace=customer_namespace):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/peterkarman/git/DryRunSec/random_scripts/pinecone-finder/.venv/lib/python3.12/site-packages/pinecone/core/openapi/shared/model_utils.py", line 446, in __getitem__
    raise PineconeApiAttributeError(
pinecone.core.openapi.shared.exceptions.PineconeApiAttributeError: FetchResponse has no attribute '0' at ['['received_data']']

Steps to reproduce the issue locally

test = ['my_id']
for v in index.fetch(test, namespace='my_namespace'):
    print(v.id)

Environment

  • OS Version: Mac OSX
  • Python version: 3.12.7
  • Python SDK version: All versions

Additional context
Via direct call with curl, I get data back as expected. Appears to be an issue in the sdk

in reality, my ids come from so I know these are real ids. I have tried hardcoding some as a test

pc = Pinecone(api_key=pinecone_api_key)
index = pc.Index(index_name)
id_iterator = index.list(prefix=f"my_prefix", limit=3, namespace="my_namespace")

for ids in id_iterator:
    print(ids)
    vectors = index.fetch(ids, namespace=customer_namespace)
@peterkarman1 peterkarman1 added the bug Something isn't working label Jan 9, 2025
@github-actions github-actions bot added the status:needs-triage An issue that needs to be triaged by the Pinecone team label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status:needs-triage An issue that needs to be triaged by the Pinecone team
Projects
None yet
Development

No branches or pull requests

1 participant