Repository navigation
Error on collection delete operation Chroma DB 0.6.3 #75
Copy link
Copy link
Closed as duplicate
Description
ChromaDB Version: 0.6.3
ChromaDB.Client Version: 1.0.1-ci-13073132114
Using this code:
using ChromaDB.Client;
var configOptions = new ChromaConfigurationOptions(uri: "http://localhost:8000/api/v1/");
using var httpClient = new HttpClient();
var client = new ChromaClient(configOptions, httpClient);
// Display version
var version = await client.GetVersion();
Console.WriteLine($"ChromaDB version: {version}");
// Create collection and collection client
var collection = await client.GetOrCreateCollection("test");
var collectionClient = new ChromaCollectionClient(collection, configOptions, httpClient);
// Add data to collection
List<string> movieIds = ["1", "2", "3", "4", "5" ];
List<ReadOnlyMemory<float>> descriptionEmbeddings = [
new [] { 0.10022575f, -0.23998135f },
new [] { 0.10327095f, 0.2563685f },
new [] { 0.095857024f, -0.201278f },
new [] { 0.106827796f, 0.21676421f },
new [] { 0.09568083f, -0.21177962f },
];
List<Dictionary<string,object>> metadata =
[
new Dictionary<string, object> { ["Title"] = "The Lion King" },
new Dictionary<string, object> { ["Title"] = "Inception" },
new Dictionary<string, object> { ["Title"] = "Toy Story" },
new Dictionary<string, object> { ["Title"] = "Pulp Fiction" },
new Dictionary<string, object> { ["Title"] = "Shrek" },
];
await collectionClient.Add(movieIds, descriptionEmbeddings, metadata);
// Get item from collection
var movieResult = await collectionClient.Get(movieIds[0], include: ChromaGetInclude.Metadatas);
Console.WriteLine($"Title: {(string) movieResult.Metadata["Title"] ?? string.Empty}");
// Query collection
// A family friendly movie
List<ReadOnlyMemory<float>> queryEmbedding = [new([0.12217915f, -0.034832448f])];
var queryResult = await collectionClient.Query(
queryEmbeddings: queryEmbedding,
nResults: 2,
include: ChromaQueryInclude.Metadatas | ChromaQueryInclude.Distances);
foreach (var result in queryResult)
{
foreach (var item in result)
{
Console.WriteLine($"Title: {(string)item.Metadata["Title"] ?? string.Empty} {(item.Distance)}");
}
}
// Clean up
await collectionClient.Delete(movieIds);
await client.DeleteCollection("test", database: "default_database");The DeleteCollection call throws an error.
Unhandled exception. ChromaDB.Client.ChromaException: Couldn't identify the error message: {"error":"InvalidArgumentError","message":"cannot unpack non-iterable coroutine object"}
at ChromaDB.Client.Common.HttpClientHelpers.Send(HttpClient httpClient, HttpRequestMessage httpRequestMessage)
at ChromaDB.Client.Common.HttpClientHelpers.Delete(HttpClient httpClient, String endpoint, RequestQueryParams queryParams)
at ChromaDB.Client.ChromaClient.DeleteCollection(String name, String tenant, String database)
at Program.<Main>$(String[] args) in C:\Dev\ChromaClientSample\ChromaClientSample\Program.cs:line 62
at Program.<Main>(String[] args)
This works on 0.6.0.
Server log
INFO: [14-02-2025 16:38:17] 172.17.0.1:43240 - "DELETE /api/v1/collections/test?tenant=default_tenant&database=default_database HTTP/1.1" 400
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
cincuranet commentedon Feb 17, 2025
Yes, it is a known issue with 0.6.3. Duplicate of #70.
Laurianti commentedon Oct 4, 2026
Chroma 0.6.3 fails on most v1 requests, while its v2 API works,
DeleteCollectionincluded. ChromaDotNet.Client uses the v2 API (#84).