# ImportError: cannot import name 'request' from 'flask'

- **ID:** `python/flask-importerror-cannot-import-name-from-flask`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Trying to import a name that does not exist in the flask module, possibly due to typo or wrong submodule.

## Version Compatibility

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

## Workarounds

1. **Correct the import statement** (95% success)
   ```
   from flask import request
   ```
2. **Check available imports with dir** (85% success)
   ```
   import flask; print([x for x in dir(flask) if not x.startswith('_')])
   ```

## Dead Ends

- **Assuming request is a direct attribute of flask** — request is in flask module, but import should be 'from flask import request'. (60% fail)
- **Using old Flask version without the attribute** — Some attributes may be added in later versions. (50% fail)
