MemPalace/mempalace · error · ValueError
qdrant requires query_embeddings; use palace.get_collection
Error message
qdrant requires query_embeddings; use palace.get_collection wrapper
What it means
Raised by QdrantCollection.query() when query_texts is passed. This backend cannot embed text server-side or internally; it accepts only precomputed query_embeddings. The message directs callers to the palace.get_collection wrapper, which embeds query_texts with the configured local model before delegating.
Source
Thrown at mempalace/backends/qdrant.py:956
ids=outer_ids,
documents=outer_docs,
metadatas=outer_metas,
distances=outer_dists,
embeddings=outer_embeds if spec.embeddings else None,
)
def query(
self,
*,
query_texts=None,
query_embeddings=None,
n_results=10,
where=None,
where_document=None,
include=None,
) -> QueryResult:
if query_texts is not None:
raise ValueError("qdrant requires query_embeddings; use palace.get_collection wrapper")
if query_embeddings is None:
raise ValueError("query requires query_embeddings")
if not query_embeddings:
raise ValueError("query input must be a non-empty list")
_validate_where(where)
_validate_where(where_document)
if _requires_local_filter(where, where_document):
return self._query_local_exact(
query_embeddings=query_embeddings,
n_results=n_results,
where=where,
where_document=where_document,
include=include,
)
if not self._remote_exists():
if self._marker_exists():
raise CollectionNotInitializedError(self._collection_name)
return QueryResult.empty(View on GitHub (pinned to 06cb6987f0)
Solutions
- Use the palace wrapper collection (palace.get_collection) which accepts query_texts and embeds them
- Or embed first: query(query_embeddings=[embedder.embed("hello")])
- Keep a single search entry point in your code that always goes through the wrapper
- Confirm the embedder runtime is up so wrapper-based text queries work
Example fix
# before
collection.query(query_texts=["hello"], n_results=5) # ValueError
// after
res = collection.query(query_embeddings=[embedder.embed("hello")], n_results=5)
# or simply: wrapped = palace.get_collection("notes"); wrapped.query(query_texts=["hello"], n_results=5) Defensive patterns
Strategy: validation
Validate before calling
if query_texts is not None:
query_embeddings = [embedder.embed(t) for t in query_texts]
query_texts = None Prevention
- Search through the palace wrapper, which accepts query_texts
- Keep one search function in the codebase; never call raw backend query with text
When it happens
Trigger: Calling raw collection.query(query_texts=["hello"], ...) — the natural call shape for Chroma users. Also a search wrapper forwarding user text straight to the backend collection without embedding it first.
Common situations: Porting search code from the default Chroma backend; using a handle from backend.get_collection() rather than palace.get_collection(); a query layer that conditionally passes texts or embeddings but never embeds the texts branch.
Related errors
- qdrant requires explicit embeddings
- query requires query_embeddings
- query input must be a non-empty list
- add ids must be unique
- ids already exist in qdrant collection: {existing.ids}
AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15).
Data as JSON: /api/errors/f22df8b8b9637c17.
Report an issue: GitHub.