4

I have a simple Redis command that does the following:

redis_conn.lpop(queue_name, batch_size)

According to the Redis documentation and their Python SDK documentation, this should be a valid request. And, yet, I get the following error:

redis.exceptions.ResponseError: wrong number of arguments for 'lpop' command

Maybe I'm being obtuse and making a noobie mistake because it's 2:00AM but, this should work. So why doesn't it?

1 Answer 1

10

Well, I was being obtuse. The documentation I linked states that the count argument is available from version 6.2. However, since I'm running Windows I don't get the newest version, ergo the failure.

4
  • I was about to comment asking what your versions of Redis, redis-py, and Python are. Glad that my thinking was going down the correct path. Generally when there's a weird mismatch from the documentation like this, it's from something being a different version than the documentation, in my experience. Commented Nov 23, 2021 at 17:11
  • 1
    @RandomDavis Agreed. I can't tell you how many times I've been bitten by my outdated version of Redis. The woes of a Windows scrub :(
    – Woody1193
    Commented Nov 23, 2021 at 17:19
  • You can always use WSL if you want to run Linux software via Windows. Should allow you to run the latest version of Redis. I used WSL to run the Linux version of Git on my Windows machine, and because it uses a Linux filesystem, it's able to do certain operations many many times faster. So it's not necessarily going to impact performance. Commented Nov 23, 2021 at 17:21
  • Only if you can enable Hypervisor, which I cannot as I'm running Windows Home
    – Woody1193
    Commented Nov 23, 2021 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.