chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Bug]: Replit template missing "own data" instruction step?

Open callumflack opened this issue 1 year ago • 1 comments

What happened?

Repeated attempt to add a few text files to a directory, and run the embed_data script with no success.

Let's pretend I made no mistakes with the script, eg. I made a few initial mistakes and learned by googling "not to use the same directory for both the Chrome database and documents under any circumstances").

The error is always says: raise NoIndexException("Index is not initialized") chromadb.errors.NoIndexException: Index is not initialized

Is there a missing step in the Replit README for adding one's own data?

[Update] This Discord person has the same issue. The Discord message linnk contains a link to their failing Replit.

Versions

python >=3.10.0, chromadb ^0.3.11. This is from your official Replit template.

Relevant log output

Traceback (most recent call last):
  File "main.py", line 180, in <module>
  File "main.py", line 161, in main
    n_results=5,
  File "/home/runner/Chroma-Pluggable-knowledge-for-AI/venv/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 199, in query
    return self._client._query(
  File "/home/runner/Chroma-Pluggable-knowledge-for-AI/venv/lib/python3.10/site-packages/chromadb/api/local.py", line 237, in _query
    uuids, distances = self._db.get_nearest_neighbors(
  File "/home/runner/Chroma-Pluggable-knowledge-for-AI/venv/lib/python3.10/site-packages/chromadb/db/clickhouse.py", line 483, in get_nearest_neighbors
    idx_metadata = self._idx.get_metadata()
  File "/home/runner/Chroma-Pluggable-knowledge-for-AI/venv/lib/python3.10/site-packages/chromadb/db/index/hnswlib.py", line 52, in get_metadata
    raise NoIndexException("Index is not initialized")
chromadb.errors.NoIndexException: Index is not initialized

callumflack avatar Apr 16 '23 06:04 callumflack

were you able to resolve this callum? basically if you're adding your own data you might as well use chroma directly - you dont actuallyneed embed_data.py from that template to use Chroma at all

swyxio avatar Apr 26 '23 21:04 swyxio

Thanks @sw-yx

callumflack avatar May 06 '23 06:05 callumflack