Skip to main content
TypeError when running pinecone.list_indexes or pinecone.create_index

TypeError when running pinecone.list_indexes or pinecone.create_index

Comments

2 comments

  • Benjamin Garrard

    straight up just initialized and ran a "list" operation and getting this.

    PINECONE_API_KEY = os.environ.get("PINECONE_API_KEY")
    PINECONE_API_ENV = os.environ.get("PINECONE_API_ENV", "asia-southeast1-gcp")
    INDEX_NAME = "text_index_768"
    pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_API_ENV)
    print(PINECONE_API_KEY)
    print(PINECONE_API_ENV)
    print(pinecone.list_indexes())
    0
  • Kevin Butler

    Hi Benjamin,

    I have run the same and it is working for me using my own environment variables. The only difference is I used a Jupyter notebook and separated the init() function from the list_indexes() function to make sure the connection is finished connecting. Perhaps this is running in a python script and the init is happening the same time as the list_indexes()?

    0

Please sign in to leave a comment.