{"record":{"id":"5c5d35f369fb9b81","repo":"grafana/k6","slug":"key-s-with-no-value","errorCode":null,"errorMessage":"key `%s` with no value","messagePattern":"key `(.+?)` with no value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lib/strvals/parser.go","lineNumber":28,"sourceCode":"\ntype tokenizer struct {\n\ti          int\n\ts          string\n\tcurrentKey string\n}\n\nfunc (t *tokenizer) readKey() (string, error) {\n\tstart := t.i\n\tfor ; t.i < len(t.s); t.i++ {\n\t\tif t.s[t.i] == '=' && t.i != len(t.s)-1 {\n\t\t\tt.i++\n\n\t\t\treturn t.s[start : t.i-1], nil\n\t\t}\n\t\tif t.s[t.i] == ',' {\n\t\t\tk := t.s[start:t.i]\n\n\t\t\treturn k, fmt.Errorf(\"key `%s` with no value\", k)\n\t\t}\n\t}\n\n\ts := t.s[start:]\n\n\treturn s, fmt.Errorf(\"key `%s` with no value\", s)\n}\n\nfunc (t *tokenizer) readValue() string {\n\tstart := t.i\n\tfor ; t.i < len(t.s); t.i++ {\n\t\tif t.s[t.i] == ',' {\n\t\t\tt.i++\n\n\t\t\treturn t.s[start : t.i-1]\n\t\t}\n\t}\n","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/lib/strvals/parser.go#L10-L46","documentation":"The strvals-style configuration string contains a key with no '=' or value: the tokenizer hit a ',' (or the end of input) while still inside a key. In practice this comes from a malformed -o otel=... (or similar key=value) option, e.g. 'a=b,barekey'. The error names the offending key, and parsing aborts entirely.","triggerScenarios":"Thrown at internal/lib/strvals/parser.go:28 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure every key in the comma-separated string has the form key=value","Check for a missing '=' after the key named in the error, stray commas, or trailing empty segments","Quote values containing commas per the strvals format"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}