# TypeError: <lambda>() missing 1 required positional argument: 'item_id'

- **ID:** `python/starlette-route-parameter-type-error`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

路由处理函数参数与路由路径参数不匹配。

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   @app.route('/items/{item_id}')\nasync def get_item(item_id: int):\n    return {'item_id': item_id}
   ```
2. **** (85% success)
   ```
   async def get_item(request):\n    item_id = request.path_params['item_id']
   ```

## Dead Ends

- **** — 掩盖问题，可能导致逻辑错误。 (60% fail)
- **** — 降低代码可读性。 (50% fail)
