# ERR wrong number of arguments

```json metadata
{
  "schema_version": 2,
  "title": "ERR wrong number of arguments",
  "description": "A command has too many or too few arguments.",
  "categories": ["docs","develop","stack","oss","rs","rc","oss","kubernetes","clients"],
  "tableOfContents": {"sections":[{"id":"example","title":"Example"},{"id":"how-to-fix-it","title":"How to fix it"}]}

,
  "codeExamples": []
}
```


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'`.

```
ERR wrong number of arguments for 'get' command
```

## Example

```
> GET
(error) ERR wrong number of arguments for 'get' command
> CONFIG GET
(error) ERR wrong number of arguments for 'config|get' command
```

## How to fix it

- **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).
- **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.
- **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"`.
- **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.

