Skip to content

[Bug] Python client connects to wrong environment  #196

Closed

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

Activity

  1. added
    bug
    on Aug 20, 2023
  2. jhamon commented on Aug 21, 2023

    @jhamon
    Collaborator

    You are setting the incorrect environment variable name and getting the default environment as a result. You should set PINECONE_ENVIRONMENT=asia-southeast1-gcp-free instead of PINECONE_ENV. We have a ticket to improve error messaging in cases like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions