{
  "schema_version": 2,
  "id": "develop/reference/errors/common/err-wrong-number-of-arguments",
  "title": "ERR wrong number of arguments",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/err-wrong-number-of-arguments/",
  "summary": "A command has too many or too few arguments.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "5469eee8ce99e7e4f573479d54cbe9bc0b597931f85f0b288d148c582fb2d1b0",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Redis returns this error when a command has more or fewer arguments than it accepts. The message names the command in lowercase. For a subcommand, it shows both names joined by `|`, such as `'config|get'`.\n\n[code example]"
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "- **An argument is missing, or there's one too many.** Compare your command with the syntax on its command page, such as [`GET`](https://redis.io/docs/latest/commands/get).\n- **Your code passed an empty list.** Commands such as [`DEL`](https://redis.io/docs/latest/commands/del), [`MGET`](https://redis.io/docs/latest/commands/mget), and [`HSET`](https://redis.io/docs/latest/commands/hset) need at least one key or field. When your code builds the arguments from a list that turns out to be empty, the command gets no keys at all. Check for an empty list before you send the command.\n- **A value with spaces was split into several arguments.** In `redis-cli`, `GET my key` sends two arguments, `my` and `key`. Put quotes around a value that contains spaces: `GET \"my key\"`.\n- **The command is `auth`, and you passed a username and a password.** Servers older than Redis 6 accept only a password. Upgrade the server, or send the password alone."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "ERR wrong number of arguments for 'get' command",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": "plaintext",
      "code": "> GET\n(error) ERR wrong number of arguments for 'get' command\n> CONFIG GET\n(error) ERR wrong number of arguments for 'config|get' command",
      "section_id": "example"
    }
  ]
}
