## 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.


```python
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()`.