Getting hnswlib error Index' has no attribute 'file_handle_count'

2.7k views Asked by At

I am trying to use chromadb which is giving me error:

c:\Users\satya\AppData\Local\Programs\Python\Python39\lib\site-packages\chromadb\config.py in instance(self, type)
hnswlib_count = hnswlib.Index.file_handle_count
hnswlib_count = cast(int, hnswlib_count)

AttributeError: type object 'hnswlib.Index' has no attribute 'file_handle_count'

I am using Python3.9 and versions of hnswlib and chromadb are:

PS C:\Users\satya> pip show hnswlib
Name: hnswlib
Version: 0.7.0
Summary: hnswlib
Home-page: https://github.com/yurymalkov/hnsw
Author: Yury Malkov and others
Author-email: 
License: 
Location: c:\users\satya\appdata\local\programs\python\python39\lib\site-packages
Requires: numpy
Required-by: 

PS C:\Users\satya> pip show chromadb
Name: chromadb
Version: 0.4.5
Summary: Chroma.
Home-page:
Author:
Author-email: Jeff Huber <[email protected]>, Anton Troynikov <[email protected]>
License:
Location: c:\users\satya\appdata\local\programs\python\python39\lib\site-packages
Requires: chroma-hnswlib, fastapi, importlib-resources, numpy, onnxruntime, overrides, posthog, pulsar-client, pydantic, pypika, requests, tokenizers, tqdm, typing-extensions, uvicorn
Required-by:
1

There are 1 answers

0
mannuscript On

Using the chromadb==0.4.3 version helped me to resolve the issue with python 3.9