# RuntimeError: The session is unavailable because no secret key was set.  Set the secret_key on the application to something unique and secret.

- **ID:** `python/flask-session-cookie-size-exceeded`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Flask 未配置 app.secret_key，导致会话（session）功能无法使用。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (100% success)
   ```
   import os
app.secret_key = os.urandom(24)
# 或 app.config['SECRET_KEY'] = 'your-secret-key'
   ```

## Dead Ends

- **** — 空字符串会被视为未设置，仍然抛出同样的错误 (95% fail)
- **** — None 同样无效，Flask 要求一个非空的字符串值 (90% fail)
