Node-redis: Strange ERR value is not a valid float message

Created on 1 Jan 2015  路  7Comments  路  Source: NodeRedis/node-redis

Using NodeJS and Redis (promisified via BlueBird).

Getting inconsistent error:

Possibly unhandled Error: ERR value is not a valid float
at ReplyParser.RedisClient.init_parser (/home/adam/Deep-Ads/node_modules/redis/index.js:317:31)

Any ideas?

invalid question

Most helpful comment

Check zadd statements. KEY,SCORE,VALUE.
You must have swapped score and value

All 7 comments

Do you have any way to reproduce this?

If you can afford it in production, a useful thing to do is run with debug_mode set. This will log all of the raw protocol data in and out of the client. If we knew what data was being read right before this error, it'd be pretty straightforward to fix.

I'm having this issue too. What did you find you?

Check zadd statements. KEY,SCORE,VALUE.
You must have swapped score and value

@twappworld did the comment from @ganeshnaidu help you?

Just in case anyone finds this issue and was having the same problem I was...

I was combining multiple values to get my score before setting it and one of my values was NaN which was causing this error. After fixing the NaN the problem went away.

Using the 'c' hiredis infrastructure, I get an error - but using the redis-cli with the same string - it returns fine.

redis-cli:
127.0.0.1:6379> ZADD modbus-alarm:0 0 1548650706:"Low Voltage Alarm at 7.11"
(integer) 1

However, the following string issued to the redisCommand function seems to error out and not insert the data... I have tried both single quotes and escaped double quotes when I built the string for the redisCommand.

ZADD modbus-alarm:0 0 1548650706:"Low Voltage Alarm at 7.11"
Redis Message:ERR value is not a valid float Type:6

Thoughts?

Check zadd statements. KEY,SCORE,VALUE.
You must have swapped score and value

@fa1d87bc7f85769ea9dee2e4957321ae what is wrong in zadd queues:checkin:reserved process_id 1 Still I get the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adamgajzlerowicz picture adamgajzlerowicz  路  4Comments

lemon707 picture lemon707  路  3Comments

michaelwittig picture michaelwittig  路  3Comments

juriansluiman picture juriansluiman  路  3Comments

betimer picture betimer  路  5Comments