Immutable solution version
pinecone.core.exceptions.PineconeException with simple examples
Complete solution
How to fix 'pinecone.core.exceptions.PineconeException with simple examples' in Pinecone, straight from the verified resolution in gh:pinecone-io/python-sdk#154. Root cause plus what to change.
What was reported
Issue pinecone-io/python-sdk#154 (closed, 14 comments): I have created a simple script from readme to demonstrate that almost simple example is not working on my end for unknown reasons. I have tested several examples with the same result. However, I tested a JavaScript version that worked perfectly on my end. But I need to work with Python. Using Python 3.10.10 with poetry on a Windows machine. I have spent two days trying to figure out what happened, but I have had no luck.
import logging
import os
logging.basicConfig(level=logging.DEBUG)
from dotenv import load_dotenv
load_dotenv()
import pinecone
def main(
## The verified resolution
[rajat08 (maintainer)]: The client builds the index host as `https://{index-name}-{project-id}.svc.{environment}.pinecone.io`; this error means it cannot connect - usually a wrong index name, wrong environment, or an API key from a different project/environment. Debug step: call `pinecone.whoami()` after init and confirm the project id matches the index URL shown in the console. Reporter's workaround when inference went wrong: pass `project_name` explicitly to `pinecone.init()`.Evidence
Asked in gh:pinecone-io/python-sdk#154 (https://github.com/pinecone-io/python-sdk/issues/154): pinecone.core.exceptions.PineconeException with simple examples. The issue report: Issue pinecone-io/python-sdk#154 (closed, 14 comments): I have created a simple script from readme to demonstrate that almost simple example is not working on my end for unknown reasons. I have tested several examples with the same result. However, I tested a JavaScript version that worked perfectly on my end. But I need to work with Python. Using Python 3.10.10 with poetry on a Windows machine. I have spent two days trying to figure out what happened, but I have had no luck.
import logging
import os
logging.basicConfig(level=logging.DEBUG)
from dotenv import load_dotenv
load_dotenv()
import pinecone
def main( The verified answer: [rajat08 (maintainer)]: The client builds the index host as `https://{index-name}-{project-id}.svc.{environment}.pinecone.io`; this error means it cannot connect - usually a wrong index name, wrong environment, or an API key from a different project/environment. Debug step: call `pinecone.whoami()` after init and confirm the project id matches the index URL shown in the console. Reporter's workaround when inference went wrong: pass `project_name` explicitly to `pinecone.init()`.By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_15Rt99NRE90dJYB1Opphgw" 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">pinecone.core.exceptions.PineconeException with simple examples <span>— Vectle</span></a>