# sqlalchemy.exc.ArgumentError：Column() 的 'type' 参数应为 TypeEngine，而不是 <class 'str'>

- **ID:** `python/sqlalchemy-type-error-mapping`
- **领域:** python
- **类别:** type_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

向 Column 传递字符串而不是 SQLAlchemy 类型对象。

## 版本兼容性

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

## 解决方案

1. **Use proper SQLAlchemy type.** (95% 成功率)
   ```
   from sqlalchemy import Column, Integer, String
Column('id', Integer, primary_key=True)
   ```
2. **Check import statements.** (90% 成功率)
   ```
   from sqlalchemy.types import Integer, String
   ```

## 无效尝试

- **Using string like 'Integer' as type.** — Must import and use Integer class. (90% 失败率)
- **Using type as positional argument incorrectly.** — Column expects type as first positional arg; wrong order causes error. (70% 失败率)
