I have this script in my init:
pinecone.init(
api_key=os.environ["PINECONE_API_KEY"],
environment=os.environ["PINECONE_ENVIRONMENT_REGION"]
)
And I set PINECONE_ENVIRONMENT_REGION = "asia-southeast1-gcp-free" in my .env
But it returns error when I run the below:
embeddings = OpenAIEmbeddings(chunk_size=1)
Pinecone.from_documents(
documents, embeddings, index_name=os.environ["PINECONE_INDEX_NAME"]
)
And the error below:
MaxRetryError: HTTPSConnectionPool(host='controller."asia-southeast1-gcp-free" ', port=443): Max retries exceeded with url: / (Caused by ProtocolError('Connection aborted.', InvalidURL('URL can't contain control characters. 'controller."asia-southeast1-gcp-free" ' (found at least ' ')')))
I tried removing the whitespaces from the metadata but it still return the same error