Skip to content

[Bug] Python client connects to wrong environment  #196

@Amar-89

Description

@Amar-89

Is this a new bug in the Pinecone Python client?

  • I believe this is a new bug in the Pinecone Python Client
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Python client automatically tries to connect to "us-west1-gcp" even though the env variable is set to "asia-southeast1-gcp-free".

PINECONE_ENV=asia-southeast1-gcp-free

pinecone.core.client.exceptions.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': 'Sun, 20 Aug 2023 17:10:54 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.

Expected Behavior

It should connect to the southeast asia server instead of trying to connect to US-west.

Steps To Reproduce

Using poetry with openai, pinecone, langchain.

Relevant log output

No response

Environment

- OS: Ubuntu
- Python: 3.11.4
- pinecone: n/a

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions