go-redis/redis · error
redis: can't parse %.100q
Error message
redis: can't parse %.100q
What it means
Error "redis: can't parse %.100q" thrown in go-redis/redis.
Source
Thrown at internal/proto/reader.go:366
return util.ParseInt(line[1:], 10, 64)
case RespFloat:
return r.readFloat(line)
case RespBool:
return r.readBool(line)
case RespBigInt:
return r.readBigInt(line)
case RespString:
return r.readStringReply(line)
case RespVerbatim:
return r.readVerb(line)
case RespArray, RespSet, RespPush:
return r.readSlice(line)
case RespMap:
return r.readMap(line)
}
return nil, fmt.Errorf("redis: can't parse %.100q", line)
}
func (r *Reader) readFloat(line []byte) (float64, error) {
v := util.BytesToString(line[1:])
switch v {
case "inf":
return math.Inf(1), nil
case "-inf":
return math.Inf(-1), nil
case "nan", "-nan":
return math.NaN(), nil
}
return strconv.ParseFloat(v, 64)
}
func (r *Reader) readBool(line []byte) (bool, error) {
switch util.BytesToString(line[1:]) {
case "t":View on GitHub (pinned to 36d97525cd)
Solutions
- Check the truncated reply in the error to see the actual bytes
- Verify server version compatibility for the command used
When it happens
Trigger: Thrown at internal/proto/reader.go:366 when the library encounters an invalid state.
Common situations: Gate version-specific commands with SkipBeforeRedisVersion-style checks in application code too.
AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06).
Data as JSON: /data/errors/299c7a50ab2b6676.json.
Report an issue: GitHub.