UnauthorizedException: (401) Reason: Unauthorized HTTP response headers: HTTPHeaderDict

UnauthorizedException: (401) Reason: Unauthorized HTTP response headers: HTTPHeaderDict({‘www-authenticate’: ‘API key is missing or invalid for the environment “us-west1-gcp”. Check that the correct environment is specified.’, ‘content-length’: ‘114’, ‘date’: ‘Wed, 17 May 2023 10:24:35 GMT’, ‘server’: ‘envoy’}) HTTP response body: API key is missing or invalid for the environment “us-west1-gcp”. Check that the correct environment is specified.
This is the error I’m having but my environment is ‘asia-northeast1-gcp’

 pinecone.init(
        api_key=os.environ['PINECONE_API_KEY'],
        environment='asia-northeast1-gcp'
    )

why am I been redirected to ‘us-west1-gcp’

My environment is “asia-southeast1-gcp-free” (free version) - not sure if this helps - it is available to copy/paste from the Index tab. I have noticed occasionally Pinecone servers appear to be unavailable, so perhaps also try again.

1 Like