Skip to content
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]: Chroma HTTP Client mode #2926

Open
dhruv1707 opened this issue Oct 10, 2024 · 10 comments
Open

[Bug]: Chroma HTTP Client mode #2926

dhruv1707 opened this issue Oct 10, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@dhruv1707
Copy link

What happened?

For some reason my Chroma keeps getting reset to HTTP client mode even though I clearly create a PersistantClient instance?
Here's the code i use:
client = chromadb.PersistentClient(path=CHROMA_DATA_PATH, settings=Settings(),
tenant=DEFAULT_TENANT,
database=DEFAULT_DATABASE,)

Would appreciate some help! :)

Versions

Chroma v0.5.12, Python v3.9.6, OS: 14.4 (23E214) (Mac)

Relevant log output

Here's the output error am getting:
RuntimeError: Chroma is running in http-only client mode, and can only be run with 'chromadb.api.fastapi.FastAPI' or 'chromadb.api.async_fastapi.AsyncFastAPI' as the chroma_api_impl.             see https://docs.trychroma.com/guides#using-the-python-http-only-client for more information
@dhruv1707 dhruv1707 added the bug Something isn't working label Oct 10, 2024
@tazarov
Copy link
Contributor

tazarov commented Oct 10, 2024

@dhruv1707, can you check which chroma package you have installed?

pip show chromadb

it should show something like this:

Name: chromadb
Version: 0.5.12
Summary: Chroma.
Home-page: https://github.com/chroma-core/chroma
Author: 
Author-email: Jeff Huber <[email protected]>, Anton Troynikov <[email protected]>
License: 

@dhruv1707
Copy link
Author

@tazarov this is what it gives me:
Version: 0.5.12
Summary: Chroma.
Home-page: https://github.com/chroma-core/chroma
Author:
Author-email: Jeff Huber [email protected], Anton Troynikov [email protected]
License:

I think its the same version :)

@tazarov
Copy link
Contributor

tazarov commented Oct 10, 2024

Thanks for confirming @dhruv1707, I'll test a few things and comeback. In the meantime can you try and leave only path parameter and test.

@dhruv1707
Copy link
Author

Nope still the same @tazarov :(

@dhruv1707
Copy link
Author

@tazarov any updates?

@tazarov
Copy link
Contributor

tazarov commented Oct 11, 2024

@dhruv1707, can you check if you have this env var set chroma_api_impl?

Also check if you have the http client:

pip show chromadb-client

Note: If you have the chromadb-client package uninstall it as it will interfere with the core chroma package.

@dhruv1707
Copy link
Author

@tazarov no idt i have the "chroma_api_impl" env var set anywhere.
Also I had the chromadb-client install so I uninstalled it but now i am not being able to create a PersistantClient package?
This is the error am getting:
client = chromadb.PersistentClient(path=CHROMA_DATA_PATH)
AttributeError: module 'chromadb' has no attribute 'PersistentClient'

@tazarov
Copy link
Contributor

tazarov commented Oct 12, 2024

@dhruv1707, now try to reinstall Chroma core package:

pip install chromadb==0.5.13

I think the issue was that you had a mixed-up up virtualenv.

@dhruv1707
Copy link
Author

@tazarov thanks a ton! It's working now :)

@tazarov
Copy link
Contributor

tazarov commented Oct 12, 2024

@dhruv1707, excellent! Just for posteriority purposes, let me ask this - did you first install chromadb-client and then decide to use local persistence and install the core package (chromadb)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants