Skip to content

[Bug] Pinecone defaults to us-west-gcp when used in VSCode terminal #167

Closed

Description

@michox

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

import pinecone

api_key="MY KEY"
env="asia-southeast1-gcp"

pinecone.init(api_key=api_key, enviroment="asia-southeast1-gcp")
pinecone.whoami()

results in HTTPError: ('401 Client Error: Unauthorized for url: https://controller.us-west1-gcp.pinecone.io/actions/whoami', 'API key is missing or invalid for the environment "us-west1-gcp". Check that the correct environment is specified.')

Expected Behavior

Should not try to adress us-west-gcp when asia southeast is referenced

Steps To Reproduce

running on python 3.10.0 on windows. Happens only in Visual Studio Code (clean project, no virtual environment). Happens in a jupyter notebook and when entering python through powershell.

Relevant log output

HTTPError: ('401 Client Error: Unauthorized for url: https://controller.us-west1-gcp.pinecone.io/actions/whoami', 'API key is missing or invalid for the environment "us-west1-gcp". Check that the correct environment is specified.')

Environment

- OS:Windows 10
- Python:3.10.0
- pinecone:2.2.1

Additional Context

No response

Activity

  1. added
    bug
    on Apr 26, 2023
  2. rajat08 commented on Apr 27, 2023

    @rajat08
    Contributor

    @michox there is a typo in your code , you've used enviroment as the variable, whereas it should be environment.
    We currently don't do strict checks on variables you pass, but we should add this. Thanks for the feedback!

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