# error: In setup.cfg: 'extras_require' must be a dictionary, not a string

- **ID:** `python/setuptools-extras-require-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The extras_require configuration is incorrectly set as a plain string instead of a dictionary mapping.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **Format extras_require as a dictionary in setup.cfg** (95% success)
   ```
   [options.extras_require]
test =
    pytest
    pytest-cov
   ```
2. **Define extras_require in setup.py as a dict** (90% success)
   ```
   extras_require={'test': ['pytest', 'pytest-cov']}
   ```

## Dead Ends

- **Setting extras_require as a list** — setuptools expects a dict with extra names as keys. (90% fail)
- **Omitting extras_require** — This removes optional dependencies but may be acceptable. (70% fail)
