-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: An instance of Chroma already exists for db:8000 with different settings #1302
Comments
@jeffchuber I'm using it with embedchain and also I have several clients in my API.
So embedchain have a client of its own. And I have 5 in different part of the API. |
@denisj, PR for the fix is up. The issue was that in HttpClient we initialize the default HTTP headers to an empty dict whereas when creating a Client with the same settings the headers default to None which is the reason you see the error. EDIT: Here's an easy way to reproduce this: import chromadb
client = chromadb.HttpClient(host="localhost", port="8000")
settings = chromadb.Settings()
settings.chroma_server_host = "localhost"
settings.chroma_server_http_port = "8000"
settings.chroma_api_impl = "chromadb.api.fastapi.FastAPI"
client2= chromadb.Client(settings=settings) |
Refs: #1302 ## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Removed defaulting of headers for HttpClient as this causes differences in settings when clients are initialized from HttpClient and Client with the same settings which raises an error ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python ## Documentation Changes N/A
Sorry, but the issue still occurs with 0.4.16. |
@denisj, the fix will be released with 0.4.17. |
I don't understand why, but this still happens in the v0.4.17.
|
the same error, and any solutions was found ? thx
raise UniqueConstraintError(f"Collection {name} already exists") |
I am experiencing the same problem with chromadb version 0.4.8 on windows OS. Not sure how to remove it |
What happened?
After moving from 0.4.14 to .0.4.15, I see this error all the time when I try to connect to DB in my celery workers.
Versions
chroma 0.4.15
chromadb 0.4.15
python 3.11
docker-compose
Relevant log output
The text was updated successfully, but these errors were encountered: