multica-ai/multica · error
value %q is not a valid number
Error message
value %q is not a valid number
What it means
Returned by `encodeIssuePropertyValue` when a number-typed property receives a `--value` that Go's `strconv.ParseFloat` cannot parse. The raw value is echoed verbatim so the bad input is obvious.
Source
Thrown at server/cmd/multica/cmd_property.go:479
parts := strings.Split(raw, ",")
ids := make([]string, 0, len(parts))
for _, part := range parts {
if strings.TrimSpace(part) == "" {
continue
}
id, err := resolveOption(part)
if err != nil {
return nil, err
}
ids = append(ids, id)
}
if len(ids) == 0 {
return nil, fmt.Errorf("--value must list at least one option; valid options: %s", strings.Join(optionNames, ", "))
}
return json.Marshal(ids)
case "number":
if _, err := strconv.ParseFloat(raw, 64); err != nil {
return nil, fmt.Errorf("value %q is not a valid number", raw)
}
return json.RawMessage(raw), nil
case "checkbox":
if raw != "true" && raw != "false" {
return nil, fmt.Errorf("value %q is not a valid bool (expected true or false)", raw)
}
return json.RawMessage(raw), nil
default: // text, date, url — validated server-side
return json.Marshal(raw)
}
}
// formatIssuePropertyValue renders a stored value for humans: option ids
// become option names, everything else prints via formatMetadataValue.
func formatIssuePropertyValue(property propertyDTO, value any) string {
optionName := func(id string) string {
for _, opt := range property.Config.Options {
if opt.ID == id {View on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass a plain decimal number in dot notation: `--value 3.14`, `--value -2`, `--value 1e3`.
- Strip units/whitespace/locale separators in the calling script before passing the value.
- Check the property's type with `multica property list` if unsure whether it expects a number.
Example fix
// before multica issue property set ISS-1 --name Estimate --value "1,5" // error: value "1,5" is not a valid number // after multica issue property set ISS-1 --name Estimate --value "1.5"
Defensive patterns
Strategy: validation
Validate before calling
# bash: verify numeric input in dot notation before passing it case "$VAL" in ''|*[!0-9.eE+-]*) echo "not a number: $VAL" >&2; exit 1;; esac
Type guard
func isParsableNumber(raw string) bool {
_, err := strconv.ParseFloat(raw, 64)
return err == nil
} Prevention
- Use dot decimal notation, never locale commas.
- Pass raw numbers without units or surrounding whitespace.
- Empty variables intended as 'unset' should call unset, not set.
When it happens
Trigger: `--value abc`, `--value 1,5` (comma decimal), `--value ""`, or any non-numeric string on a property whose type is `number`. Note the raw string is forwarded as JSON after the check, so it must parse as a float.
Common situations: Locale-formatted numbers (`1,5` instead of `1.5`); empty shell variables; trailing whitespace or units (`10px`) in scripted values.
Related errors
- invalid direction %q (want \"up\" or \"down\")
- --name is required
- --runtime-id is required
- --runtime-config must be valid JSON: %w
- %s must be a JSON object, or 'null' to clear
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/f9f6b0f167a734ed.
Report an issue: GitHub.