# AssertionError: Path /items conflicts with existing route

- **ID:** `python/starlette-route-duplicate`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在Starlette应用中定义了多个相同路径的路由，导致冲突。

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   合并路由或使用不同路径：
@app.route("/items")
async def list_items(request): ...
@app.route("/items/{item_id}")
async def get_item(request): ...
   ```
2. **** (90% success)
   ```
   使用路由前缀：
app = Starlette(routes=[
    Route("/api/items", endpoint=...),
    Route("/api/items/{id}", endpoint=...)
])
   ```

## Dead Ends

- **** — 尝试使用不同的方法（GET/POST）但路径相同，仍会冲突。 (60% fail)
- **** — 忽略冲突，但路由匹配可能意外。 (80% fail)
