If you’re getting an error that reads “ERR wrong number of arguments for ‘spop’ command” in Redis, it’s because you’re calling the SPOP
command with the wrong number of arguments.
At the time of writing, I find that I only get this argument when I pass no arguments. If I pass too many, I get a different error.
In any case, to fix this issue, be sure to pass at least one argument to the command (and at the time of writing, no more than two).
Continue reading