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!
Daniel Song is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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?
Armando is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2