chroma-core/chroma · error · TypeError
limit must be a Limit object, dict, int, or None, got {type(
Error message
limit must be a Limit object, dict, int, or None, got {type(limit).__name__} What it means
Error "limit must be a Limit object, dict, int, or None, got {type(limit).__name__}" thrown in chroma-core/chroma.
Source
Thrown at chromadb/execution/expression/plan.py:140
self._group_by = group_by
elif isinstance(group_by, dict):
self._group_by = GroupBy.from_dict(group_by)
else:
raise TypeError(
f"group_by must be a GroupBy object, dict, or None, got {type(group_by).__name__}"
)
# Handle limit parameter
if limit is None:
self._limit = Limit()
elif isinstance(limit, Limit):
self._limit = limit
elif isinstance(limit, int):
self._limit = Limit.from_dict({"limit": limit, "offset": 0})
elif isinstance(limit, dict):
self._limit = Limit.from_dict(limit)
else:
raise TypeError(
f"limit must be a Limit object, dict, int, or None, got {type(limit).__name__}"
)
# Handle select parameter
if select is None:
self._select = Select()
elif isinstance(select, Select):
self._select = select
elif isinstance(select, dict):
self._select = Select.from_dict(select)
elif isinstance(select, (list, set)):
# Convert list/set of strings to Select object
self._select = Select.from_dict({"keys": list(select)})
else:
raise TypeError(
f"select must be a Select object, dict, list, set, or None, got {type(select).__name__}"
)
View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at chromadb/execution/expression/plan.py:140 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/9d679e088e6fd48f.
Report an issue: GitHub.