0

I am just trying to reset a database hosted on a docker container:

import chromadb
from chromadb.config import Settings

client = chromadb.HttpClient(host="localhost", port=8000, settings=Settings(allow_reset=True))
client.reset()

But, the above code throws the following exception:

Exception: {"error":"ValueError('Resetting is not allowed by this configuration (to enable it, set `allow_reset` to `True` in your Settings() or include `ALLOW_RESET=TRUE` in your environment variables)')"}

I am not sure why it is causing this issue, any help would be appreciated!

2 Answers 2

2

I had exactly the same issue with my implementation:

chroma_client = chromadb.PersistentClient(path=CHROMADB_PATH)

and came here looking for a fix—but when I added the same setting as you:

chroma_client = chromadb.PersistentClient(path=CHROMADB_PATH, settings=Settings(allow_reset=True))

it just worked! Is there any chance you're running a previous version of your code? Or caching something? Is the URI the local one?

Sign up to request clarification or add additional context in comments.

2 Comments

Well I am using httpclient... can you still access the http hosted db with persistent Client?
Please don’t post answers saying that a problem is unreproducible to you. Those are better suited for comments.
0

Issue resolved when I added

-e ALLOW_RESET=TRUE

on my docker run command

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.