qishibo/AnotherRedisDesktopManager · warning
Vector is required
Error message
Vector is required
What it means
The vector text failed parseVectorText: either it is empty, or splitting on commas produced entries that are not finite numbers ('0.1;0.2', 'a,b', '0.1, , 0.3', localized '0,12', Infinity). No VADD is sent; this is purely client-side.
Source
Thrown at src/components/contents/KeyContentVector.vue:355
this.loadElementDetail(row.element).then((detail) => {
this.$set(this.editLineItem, 'vectorText', detail.vectorText);
this.$set(this.editLineItem, 'attrs', detail.attrs);
}).catch((e) => {
this.$message.error(e.message);
});
}
},
editLine() {
const before = this.beforeEditItem;
const element = (this.editLineItem.element || '').trim();
const vector = this.parseVectorText(this.editLineItem.vectorText);
const attrs = (this.editLineItem.attrs || '').trim();
if (!element) {
return this.$message.error('Element is required');
}
if (!vector || !vector.length) {
return this.$message.error('Vector is required');
}
if (this.dim && vector.length !== this.dim) {
return this.$message.error(`Vector dimension must be ${this.dim}`);
}
if (attrs && !this.$util.isJson(attrs)) {
return this.$message.error('Attributes must be valid JSON');
}
this.editDialog = false;
const vaddArgs = [this.redisKey, 'VALUES', vector.length, ...vector, element];
// must match existing set quant-type, otherwise: ERR asked quantization mismatch
const quantOpt = this.getQuantOption();
quantOpt && vaddArgs.push(quantOpt);
// set attributes
attrs && vaddArgs.push('SETATTR', attrs);
View on GitHub (pinned to c149855106)
Solutions
- Use comma-separated plain numbers: 0.12, 0.45, 0.78
- Scan for double commas, stray letters, and convert decimal commas to points
- Prefer the pre-filled vectorText from VEMB when editing an existing element
Defensive patterns
Strategy: validation
Validate before calling
const parts = text.split(',').map((p) => Number(p.trim()));
if (!text.trim() || parts.some((n) => !Number.isFinite(n))) {
return this.$message.error('Vector must be comma-separated finite numbers');
} Type guard
const isNumericVector = (text) => {
if (typeof text !== 'string' || !text.trim()) return false;
return text.split(',').every((p) => Number.isFinite(Number(p.trim())));
}; Prevention
- Parse and validate the vector before constructing VADD args — server-side rejection is worse feedback than a client-side message
- Reject non-finite components explicitly; Number('') is 0 and silently shifts bad data
- Show the expected input format (comma-separated floats) next to the field
When it happens
Trigger: Space- or semicolon-separated embeddings pasted from tensor output; empty slot between double commas; locale-formatted decimal commas; trailing comma.
Common situations: Copying vectors from Python/JS printouts, CSVs, or logs that use different separators; partial selection when copying a long embedding.
Related errors
- Element is required
- Attributes must be valid JSON
- Vector dimension must be ${this.dim}
- this.$t('message.json_format_failed')
- this.$t('message.json_format_failed')
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/ebd7ebcbf42adcaa.
Report an issue: GitHub.