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]: An instance of Chroma already exists for db:8000 with different settings #1302

Closed
denisj opened this issue Oct 27, 2023 · 8 comments
Closed
Labels
bug Something isn't working

Comments

@denisj
Copy link

denisj commented Oct 27, 2023

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

api_1            | INFO:     192.168.32.8:58518 - "GET /api/v1/queries?question=Did%20ukraine%20on%20war?&call_gpt=false&collection_name=cp_137 HTTP/1.0" 500 Internal Server Error
api_1            | ERROR:    Exception in ASGI application
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 98, in receive
api_1            |     return self.receive_nowait()
api_1            |            ^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 93, in receive_nowait
api_1            |     raise WouldBlock
api_1            | anyio.WouldBlock
api_1            | 
api_1            | During handling of the above exception, another exception occurred:
api_1            | 
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 78, in call_next
api_1            |     message = await recv_stream.receive()
api_1            |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 118, in receive
api_1            |     raise EndOfStream
api_1            | anyio.EndOfStream
api_1            | 
api_1            | During handling of the above exception, another exception occurred:
api_1            | 
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
api_1            |     result = await app(  # type: ignore[func-returns-value]
api_1            |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
api_1            |     return await self.app(scope, receive, send)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1115, in __call__
api_1            |     await super().__call__(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
api_1            |     await self.middleware_stack(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
api_1            |     raise exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
api_1            |     await self.app(scope, receive, _send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 108, in __call__
api_1            |     response = await self.dispatch_func(request, call_next)
api_1            |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/project/__init__.py", line 30, in add_no_cache_header
api_1            |     response = await call_next(request)
api_1            |                ^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 84, in call_next
api_1            |     raise app_exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 70, in coro
api_1            |     await self.app(scope, receive_or_disconnect, send_no_error)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 83, in __call__
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
api_1            |     raise exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
api_1            |     await self.app(scope, receive, sender)
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
api_1            |     raise e
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
api_1            |     await route.handle(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
api_1            |     response = await func(request)
api_1            |                ^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
api_1            |     raw_response = await run_endpoint_function(
api_1            |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
api_1            |     return await run_in_threadpool(dependant.call, **values)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
api_1            |     return await anyio.to_thread.run_sync(func, *args)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
api_1            |     return await get_asynclib().run_sync_in_worker_thread(
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
api_1            |     return await future
api_1            |            ^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
api_1            |     result = context.run(func, *args)
api_1            |              ^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/project/queries/routes.py", line 18, in query
api_1            |     embedchain_app = create_embedchain_app(collection_name)
api_1            |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/embedchain_app/__init__.py", line 37, in create_embedchain_app
api_1            |     db = ChromaDB(
api_1            |          ^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/embedchain/vectordb/chroma.py", line 60, in __init__
api_1            |     self.client = chromadb.Client(self.settings)
api_1            |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/__init__.py", line 190, in Client
api_1            |     return ClientCreator(tenant=tenant, database=database, settings=settings)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 133, in __init__
api_1            |     super().__init__(settings=settings)
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 36, in __init__
api_1            |     SharedSystemClient._create_system_if_not_exists(self._identifier, settings)
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 55, in _create_system_if_not_exists
api_1            |     raise ValueError(
api_1            | ValueError: An instance of Chroma already exists for db:8000 with different settings
@denisj denisj added the bug Something isn't working label Oct 27, 2023
@jeffchuber
Copy link
Contributor

@denisj you can see the new code here -

f"An instance of Chroma already exists for {identifier} with different settings"

we updated how client's work - here is the PR #1244

Can you provide some more info here? Id love to help but not sure where to start

@denisj
Copy link
Author

denisj commented Nov 2, 2023

@jeffchuber I'm using it with embedchain and also I have several clients in my API.

chroma_client = chromadb.HttpClient(host='db', port=8000)

So embedchain have a client of its own. And I have 5 in different part of the API.

@tazarov
Copy link
Contributor

tazarov commented Nov 3, 2023

@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)

HammadB pushed a commit that referenced this issue Nov 7, 2023
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
@HammadB HammadB closed this as completed Nov 10, 2023
@denisj
Copy link
Author

denisj commented Nov 10, 2023

Sorry, but the issue still occurs with 0.4.16.

@tazarov
Copy link
Contributor

tazarov commented Nov 10, 2023

@denisj, the fix will be released with 0.4.17.

@denisj
Copy link
Author

denisj commented Nov 14, 2023

I don't understand why, but this still happens in the v0.4.17.

ERROR:    Exception in ASGI application
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 98, in receive
api_1            |     return self.receive_nowait()
api_1            |            ^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 93, in receive_nowait
api_1            |     raise WouldBlock
api_1            | anyio.WouldBlock
api_1            | 
api_1            | During handling of the above exception, another exception occurred:
api_1            | 
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 78, in call_next
api_1            |     message = await recv_stream.receive()
api_1            |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 118, in receive
api_1            |     raise EndOfStream
api_1            | anyio.EndOfStream
api_1            | 
api_1            | During handling of the above exception, another exception occurred:
api_1            | 
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
api_1            |     result = await app(  # type: ignore[func-returns-value]
api_1            |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
api_1            |     return await self.app(scope, receive, send)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
api_1            |     await super().__call__(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
api_1            |     await self.middleware_stack(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
api_1            |     raise exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
api_1            |     await self.app(scope, receive, _send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 108, in __call__
api_1            |     response = await self.dispatch_func(request, call_next)
api_1            |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/project/__init__.py", line 30, in add_no_cache_header
api_1            |     response = await call_next(request)
api_1            |                ^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 84, in call_next
api_1            |     raise app_exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 70, in coro
api_1            |     await self.app(scope, receive_or_disconnect, send_no_error)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 83, in __call__
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
api_1            |     raise exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
api_1            |     await self.app(scope, receive, sender)
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
api_1            |     raise e
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
api_1            |     await route.handle(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
api_1            |     response = await func(request)
api_1            |                ^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
api_1            |     raw_response = await run_endpoint_function(
api_1            |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
api_1            |     return await run_in_threadpool(dependant.call, **values)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
api_1            |     return await anyio.to_thread.run_sync(func, *args)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
api_1            |     return await get_asynclib().run_sync_in_worker_thread(
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
api_1            |     return await future
api_1            |            ^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
api_1            |     result = context.run(func, *args)
api_1            |              ^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/project/queries/routes.py", line 26, in query
api_1            |     embedchain_app = create_embedchain_app(collection_name, app_id)
api_1            |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/embedchain_app/__init__.py", line 36, in create_embedchain_app
api_1            |     db = ChromaDB(
api_1            |          ^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/embedchain/vectordb/chroma.py", line 60, in __init__
api_1            |     self.client = chromadb.Client(self.settings)
api_1            |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/__init__.py", line 188, in Client
api_1            |     return ClientCreator(tenant=tenant, database=database, settings=settings)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 138, in __init__
api_1            |     super().__init__(settings=settings)
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 41, in __init__
api_1            |     SharedSystemClient._create_system_if_not_exists(self._identifier, settings)
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 60, in _create_system_if_not_exists
api_1            |     raise ValueError(
api_1            | ValueError: An instance of Chroma already exists for db:8000 with different settings

@riverind
Copy link

I don't understand why, but this still happens in the v0.4.17.

ERROR:    Exception in ASGI application
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 98, in receive
api_1            |     return self.receive_nowait()
api_1            |            ^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 93, in receive_nowait
api_1            |     raise WouldBlock
api_1            | anyio.WouldBlock
api_1            | 
api_1            | During handling of the above exception, another exception occurred:
api_1            | 
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 78, in call_next
api_1            |     message = await recv_stream.receive()
api_1            |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 118, in receive
api_1            |     raise EndOfStream
api_1            | anyio.EndOfStream
api_1            | 
api_1            | During handling of the above exception, another exception occurred:
api_1            | 
api_1            | Traceback (most recent call last):
api_1            |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
api_1            |     result = await app(  # type: ignore[func-returns-value]
api_1            |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
api_1            |     return await self.app(scope, receive, send)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
api_1            |     await super().__call__(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
api_1            |     await self.middleware_stack(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
api_1            |     raise exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
api_1            |     await self.app(scope, receive, _send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 108, in __call__
api_1            |     response = await self.dispatch_func(request, call_next)
api_1            |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/project/__init__.py", line 30, in add_no_cache_header
api_1            |     response = await call_next(request)
api_1            |                ^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 84, in call_next
api_1            |     raise app_exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 70, in coro
api_1            |     await self.app(scope, receive_or_disconnect, send_no_error)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 83, in __call__
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
api_1            |     raise exc
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
api_1            |     await self.app(scope, receive, sender)
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
api_1            |     raise e
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
api_1            |     await route.handle(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
api_1            |     await self.app(scope, receive, send)
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
api_1            |     response = await func(request)
api_1            |                ^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app
api_1            |     raw_response = await run_endpoint_function(
api_1            |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
api_1            |     return await run_in_threadpool(dependant.call, **values)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
api_1            |     return await anyio.to_thread.run_sync(func, *args)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
api_1            |     return await get_asynclib().run_sync_in_worker_thread(
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
api_1            |     return await future
api_1            |            ^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
api_1            |     result = context.run(func, *args)
api_1            |              ^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/project/queries/routes.py", line 26, in query
api_1            |     embedchain_app = create_embedchain_app(collection_name, app_id)
api_1            |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/app/embedchain_app/__init__.py", line 36, in create_embedchain_app
api_1            |     db = ChromaDB(
api_1            |          ^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/embedchain/vectordb/chroma.py", line 60, in __init__
api_1            |     self.client = chromadb.Client(self.settings)
api_1            |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/__init__.py", line 188, in Client
api_1            |     return ClientCreator(tenant=tenant, database=database, settings=settings)
api_1            |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 138, in __init__
api_1            |     super().__init__(settings=settings)
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 41, in __init__
api_1            |     SharedSystemClient._create_system_if_not_exists(self._identifier, settings)
api_1            |   File "/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 60, in _create_system_if_not_exists
api_1            |     raise ValueError(
api_1            | ValueError: An instance of Chroma already exists for db:8000 with different settings

the same error, and any solutions was found ? thx

import chromadb
chromadb.version
'0.4.17'

raise UniqueConstraintError(f"Collection {name} already exists")
chromadb.db.base.UniqueConstraintError: Collection 2wikimultihopqa already exists

@mali404
Copy link

mali404 commented Apr 7, 2024

I am experiencing the same problem with chromadb version 0.4.8 on windows OS. Not sure how to remove it

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

6 participants