# fastapi.exceptions.RequestValidationError: [{'loc': ['path', 'item_id'], 'msg': 'value is not a valid integer', 'type': 'type_error.integer'}]

- **ID:** `python/fastapi-path-param-type-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A path parameter annotated as int receives a non-integer value from the URL.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Ensure the client sends an integer in the URL, e.g., /items/123
   ```
2. **** (100% success)
   ```
   Use a Pydantic model or path converter: @app.get('/items/{item_id}') with item_id: int
   ```

## Dead Ends

- **** — This doesn't fix the client's request; they still need to send a valid integer. (60% fail)
- **** — Loses automatic validation; you have to handle conversion errors yourself. (50% fail)
