# werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'user_profile'. Did you forget to specify values for 'user_id'?

- **ID:** `python/flask-url-for-endpoint-not-found`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The url_for function is called for an endpoint that expects path parameters, but those parameters are not provided.

## Version Compatibility

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

## Workarounds

1. **** (100% success)
   ```
   Provide required parameters: url_for('user_profile', user_id=123)
   ```
2. **** (80% success)
   ```
   Make the parameter optional in the route definition: @app.route('/user/<int:user_id>', defaults={'user_id': 0})
   ```

## Dead Ends

- **** — The route requires user_id, so it cannot build the URL. (100% fail)
- **** — Inconsistent endpoint names cause confusion and may lead to other BuildErrors. (70% fail)
