# 无法从字符串 'sqlite:////tmp/test.db' 解析 SQLAlchemy URL

- **ID:** `python/sqlalchemy-invalid-sqlite-url`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

SQLite URL 中斜杠数量错误；四个斜杠表示绝对路径，三个表示相对路径，但常被误用。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (100% 成功率)
   ```
   engine = create_engine('sqlite:////tmp/test.db')  # absolute
# or
engine = create_engine('sqlite:///./test.db')  # relative
   ```

## 无效尝试

- **** — Changes path interpretation; may point to wrong file. (50% 失败率)
- **** — Makes it a relative path unexpectedly. (40% 失败率)
