# pydantic.errors.PydanticUserError: `orm_mode` is deprecated. Use `from_attributes` instead.

- **ID:** `python/fastapi-pydantic-v1-v2-migration-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Code written for Pydantic v1 (`class Config: orm_mode = True`) runs under Pydantic v2, which renamed the setting.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   class UserOut(BaseModel):
    model_config = ConfigDict(from_attributes=True)
    id: int
    name: str
   ```
2. **** (85% success)
   ```
   Run `bump-pydantic` codemod: `pip install bump-pydantic && bump-pydantic .` to auto-migrate.
   ```

## Dead Ends

- **** — FastAPI 0.100+ requires Pydantic v2; pip resolver errors. (90% fail)
- **** — Config is ignored; from_orm/validation fails at runtime. (85% fail)
