chroma
chroma copied to clipboard
default setting for persist_directory leads to ValueError
Traceback (most recent call last):
File "/Users/patrickgerard/Documents/GitHub/AI-video-genie/src/main.py", line 99, in <module>
genius = Genius()
File "/Users/patrickgerard/Documents/GitHub/AI-video-genie/src/main.py", line 19, in __init__
self.client = chromadb.Client(Settings(
File "/Users/patrickgerard/Documents/GitHub/AI-video-genie/venv/lib/python3.8/site-packages/chromadb/__init__.py", line 83, in Client
return chromadb.api.local.LocalAPI(settings, get_db(settings), telemetry_client)
File "/Users/patrickgerard/Documents/GitHub/AI-video-genie/venv/lib/python3.8/site-packages/chromadb/__init__.py", line 46, in get_db
return chromadb.db.duckdb.PersistentDuckDB(settings)
File "/Users/patrickgerard/Documents/GitHub/AI-video-genie/venv/lib/python3.8/site-packages/chromadb/db/duckdb.py", line 371, in __init__
raise ValueError(
ValueError: You cannot use chroma's cache directory .chroma/, please set a different directory```
in duckdb.py
it's raised
if settings.persist_directory == ".chroma":
raise ValueError(
"You cannot use chroma's cache directory .chroma/, please set a different directory"
)
but in the Get-started userguide it's stated to work
from chromadb.config import Settings
client = chromadb.Client(Settings(
chroma_db_impl="duckdb+parquet",
persist_directory="/path/to/persist/directory" # Optional, defaults to .chromadb/ in the current directory
))
by not setting a default -> .chromabd/
but it's set as default in config.py
class Settings(BaseSettings):
.....
persist_directory: str = ".chroma"
.....
I will fix it in a PR.
I brought this up in #330 out of curiosity, what are you going to do to fix it?
oh hi @theoskille, I changed the path to what it should be according to the docs :) Didn't see that you opened something already! But might worth to change it to the actual docs.
Completed with Chroma 0.4