weaviate/weaviate · error
object %d: %w
Error message
object %d: %w
What it means
CalculatePath computes the path per input object in a loop; if any per-object computation fails, it wraps the inner error as 'object <i>: ...' to identify which search result broke the batch. The message identifies the failing object index; the root cause is in the wrapped inner error.
Source
Thrown at modules/text2vec-contextionary/additional/sempath/builder.go:87
if params == nil {
return nil, fmt.Errorf("no params provided")
}
dims := len(in[0].Vector)
if err := params.SetDefaultsAndValidate(len(in), dims); err != nil {
return nil, errors.Wrap(err, "invalid params")
}
searchNeighbors, err := pb.addSearchNeighbors(params)
if err != nil {
return nil, err
}
for i, obj := range in {
path, err := pb.calculatePathPerObject(obj, in, params, searchNeighbors)
if err != nil {
return nil, fmt.Errorf("object %d: %w", i, err)
}
if in[i].AdditionalProperties == nil {
in[i].AdditionalProperties = models.AdditionalProperties{}
}
in[i].AdditionalProperties["semanticPath"] = path
}
return in, nil
}
func (pb *PathBuilder) calculatePathPerObject(obj search.Result, allObjects []search.Result, params *Params,
searchNeighbors []*txt2vecmodels.NearestNeighbor,
) (*txt2vecmodels.SemanticPath, error) {
dims := len(obj.Vector)
matrix, neighbors, err := pb.vectorsToMatrix(obj, allObjects, dims, params, searchNeighbors)
if err != nil {View on GitHub (pinned to 75aa4b6d11)
Solutions
- Read the wrapped inner error after 'object <i>:' to find the actual cause
- Inspect/repair the object at the reported index (fix its vector dimensions or re-vectorize it)
- Re-run the semanticPath query once the offending object is fixed
Defensive patterns
Strategy: try-catch
Try / catch
res, err := builder.CalculatePath(in, params)
if err != nil {
var idx int
if n, _ := fmt.Sscanf(err.Error(), "object %d:", &idx); n == 1 {
// inspect/fix search result at index idx, then retry without it
}
return err
} Prevention
- Keep object vectors dimensionally consistent across the collection
- Re-vectorize objects after changing vectorizer settings
- Log the failing object ID alongside the index
When it happens
Trigger: Any failure inside calculatePathPerObject for the i-th result — t-SNE embedding failure, inconsistent vector lengths (see vectorsToMatrix errors), nil neighbors — during a semanticPath query over multiple results.
Common situations: One malformed object (wrong dimensions, missing neighbors) in an otherwise valid semanticPath query; the index tells you which search result to inspect.
Related errors
- item %d has no vector
- have different output results than input %d != %d
- object: inconsistent vector lengths found: dimensions=%d and
- neighbor: inconsistent vector lengths found: dimensions=%d a
- %s
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/0f62993fff2ac6d3.
Report an issue: GitHub.