# FixtureDefError: finalizer <function ...> raised an exception

- **ID:** `python/pytest-fixure-finalizer-error`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在 fixture 的 finalizer 中发生异常，导致 pytest 无法正常清理

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.4.0 | active | — | — |

## Workarounds

1. **** (80% success)
   ```
   在 finalizer 中使用 try-except 并记录日志
   ```
2. **** (90% success)
   ```
   在 yield 后清理，异常会被捕获
   ```

## Dead Ends

- **** — 可能导致资源泄漏 (70% fail)
- **** — 可能掩盖真实错误 (50% fail)
