# ValueError: Interactive mode must be a boolean, got 'True' (string).

- **ID:** `python/matplotlib-interactive-mode-error`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Passing a string instead of a boolean to plt.ion() or plt.ioff(), or setting rcParams['interactive'] to a string.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.7 | active | — | — |
| 3.8 | active | — | — |

## Workarounds

1. **Use plt.ion() to enable interactive mode (no arguments)** (95% success)
   ```
   plt.ion()
   ```
2. **Set rcParams with a boolean** (90% success)
   ```
   plt.rcParams['interactive'] = True
   ```

## Dead Ends

- **Using 1 or 0 instead of True/False** — While 1 and 0 are truthy, they are not booleans; the function expects a bool. (70% fail)
- **Setting plt.ion(True) with parentheses** — plt.ion() takes no arguments; it toggles interactive mode on. Passing an argument raises TypeError. (90% fail)
