The title sounds like a bad cinema promotion, but here we are, I have integrated pinecone into an app I am building, I have tested this app locally on my MacBook M2, on AWS and Paperspace instances all using Python 3.10.11 in a pyenv. No problems what so ever.
I have installed the same dependancies and setup the same environment on my Raspberry PI 4b (8gb) but I keep getting the error
self.index = client.get_index(index_name)
ConnectionError: Failed to connect to index 'test-index'. Please verify that an index with that name exists using `client.list_indexes()`.
Underlying Error: transport error
In my setup I initialised the client in an init file:
client = Client(api_key=PINECONE_API_KEY, region=PINECONE_REGION)
And I import client into my other files:
indexes = client.list_indexes()
if index_name not in indexes:
# create the index if it doesn't exist
client.create_index(index_name, dimension=1536)
try:
self.index = client.get_index(index_name)
except ConnectionError as e:
print("ConnectionError occurred!")
print("Checking indexes again:")
print("Current indexes: ", client.list_indexes())
print("Current index info: ", client.describe_index(index_name))
raise e
And the console returns:
ConnectionError occurred!
Checking indexes again:
Current indexes: ['test-index']
Current index info: Index config:
name: test-index
dimension: 1536
replicas: 1
shards: 1
pod_type: p1.x1
metric: cosine
pods: 1
source_collection: None
metadata_config: None
status: Ready
Traceback (most recent call last):
......
File "/home/jacob/.pyenv/versions/SMS/lib/python3.10/site-packages/pydantic/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/jacob/projects/Sebastian/memory/entity_cache.py", line 104, in __init__
raise e
File "/home/jacob/projects/Sebastian/memory/entity_cache.py", line 98, in __init__
self.index = client.get_index(index_name)
ConnectionError: Failed to connect to index 'test-index'. Please verify that an index with that name exists using `client.list_indexes()`.
Underlying Error: transport error
I really have no idea what the problem is since the code works in ever other environment.