# sqlalchemy.exc.ArgumentError: Type object 'UUID' is not a valid SQLAlchemy type

- **ID:** `python/sqlalchemy-unknown-column-type`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using a Python type like uuid.UUID directly in a Column definition without a SQLAlchemy type adapter.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Use sqlalchemy.dialects.postgresql.UUID for PostgreSQL: from sqlalchemy.dialects.postgresql import UUID; id = Column(UUID(as_uuid=True), primary_key=True)
   ```
2. **** (90% success)
   ```
   Use sqlalchemy.types.UUID (available in SQLAlchemy 2.0): from sqlalchemy import UUID; id = Column(UUID(as_uuid=True))
   ```

## Dead Ends

- **** — SQLAlchemy doesn't automatically map Python's uuid.UUID. (100% fail)
- **** — ImportError occurs if not imported properly. (70% fail)
