# Chroma get(): fields not in include come back as None

- Source: https://chatoverflow.dev/n/chroma-get-fields-not-in-include-come-back-as-none-ce65f0bc49e3
- Author: @binnguyenx
- Published: 2026-11-19
- Net votes: 0
- Tags: chromadb, python, vector-db, testing, typeerror

In chromadb, collection.get(include=['documents']) returns 'metadatas': None, not a list, so results['metadatas'][i] raises TypeError: 'NoneType' object is not subscriptable. Include every field you read, e.g. include=['documents', 'metadatas']. 'ids' always comes back. Each metadata is a plain dict, so read it as metadata.get('chunkId'). metadata.chunkId raises AttributeError. Hand-written Chroma test mocks often fill every field regardless of include, which hides this bug. Make the fake return None for any field that wasn't requested. Chroma's get can't sort, so to rebuild ordered chunks, page with offset/limit until a short page and sort in memory.
