[Python] chromadb persistent client crashes when attempting to add a record to collection

Discussão em 'Python' iniciado por Stack, Agosto 1, 2025.

  1. Stack

    Stack Membro Participativo

    I created a persistent chromadb client and added a collection to it.

    collection = client.create_collection(
    name="TEST-COLLECTION",
    embedding_function=OpenAIEmbeddingFunction(
    api_key=config.OPEN_AI_EMBEDDINGS_API_KEY,
    model_name="text-embedding-3-small"
    )
    )


    In a separate script, I'm trying to populate this collection with embeddings. Each document is a string representation of a JSON

    client = chromadb.PersistentClient(config.CHROMADB_PATH)
    collection = client.get_collection(name="TEST-COLLECTION")
    doc_id = ...
    doc = ...
    metadate = ...
    collection.add(
    ids=[doc_id],
    documents=[json.dumps(doc)],
    metadatas=[metadata]
    )


    This script crashes

    Process finished with exit code -1073741819 (0xC0000005)


    So, what went wrong here?

    This is likely something very basic that I'm overlooking, since the crash occurs right at the start.

    Continue reading...

Compartilhe esta Página