How would I perform this Unix command in Python correctly, substituting the given values `index, username, password` into the command?

### abc.py

```
import subprocess,datetime
cmd = '\./splunk search "| dbinspect index=%s |timeformat= "%s" rename state as category | stats min(earliestTime) as earliestTime max(latestTime) as latestTime sum(sizeOnDiskMB) as MB by category " -auth %s:%s | grep -v "category" | grep -v "-"' %(index, username, password)

subprocess.call(cmd, shell = True)

```

When I try to execute the command, I get the error:

```
TypeError: not enough arguments for format string

```