Debugging Common Issues

1. Debugging Connection Failures

SymptomCheck
401API key correct, not revoked
DNS / SSLFirewall / proxy / TLS
Wrong hostRe-read index host from describe_index

2. Debugging Dimension Mismatches

Example: Validate Before Upsert

dim = pc.describe_index("docs").dimension
for v in vectors:
    assert len(v["values"]) == dim, f"Expected {dim}, got {len(v['values'])}"

3. Debugging Metadata Filter Errors

CauseFix
Type mismatchFilter type must match stored type
Unsupported opCheck operator list
Nested objectFlatten — Pinecone supports flat keys

4. Debugging Empty Query Results

Possible CauseTest
Wrong namespaceQuery without filter/ns first
Filter too narrowRemove filter; rerun
Index emptydescribe_index_stats()
Eventual consistencyWait a few seconds

5. Debugging Slow Queries

CauseFix
Cold serverlessWarm-up query
High fullnessScale
Expensive filterLower cardinality
Large top_kReduce

6. Debugging Authentication Errors

StepDetail
1. Verify keyConsole → API keys
2. Right projectIndex lives in same project as key
3. Env var loadedPrint first 4 chars

7. Debugging Quota Errors

ErrorAction
Pod quota exceededDelete unused index or upgrade plan
Index count exceededSame
Region not availableChoose different region

8. Debugging Upsert Failures

CauseFix
Vector too largeReduce dim / metadata size (40KB / vector)
Bad metadata typeOnly str/num/bool/list-of-str
Bad IDASCII, ≤512 chars

9. Debugging Namespace Issues

Example: List Namespaces

print(list(index.describe_index_stats()["namespaces"].keys()))

10. Debugging SDK Version Issues

Example: Print Version

import pinecone
print(pinecone.__version__)
Warning: Pinecone deprecated v2 (pinecone-client) in favor of v5+ pinecone package with major API differences.

11. Using Debug Logging

Example: Enable Debug

import logging
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("pinecone").setLevel(logging.DEBUG)

12. Reproducing Issues

CaptureFor Bug Report
SDK + Python versionReproducibility
Index specDimension, metric, cloud, region
Request bodySample input
Full traceback+ HTTP status code