# AttributeError: module 'sys' has no attribute 'version_info'

- **ID:** `python/unittest-skipif-attributeerror`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A typo in the skipIf condition: `version_info` is misspelled or accessed incorrectly, causing an AttributeError during test discovery.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Correct the attribute name: `@unittest.skipIf(sys.version_info < (3, 7), 'requires Python 3.7+')`
   ```
2. **** (90% success)
   ```
   Use pytest markers instead: `@pytest.mark.skipif(sys.version_info < (3,7))`
   ```

## Dead Ends

- **** — This defeats the purpose of conditional skipping and may cause failures in unsupported environments. (80% fail)
- **** — Decorators cannot be wrapped in try-except in that way; it will still raise an error at import time. (90% fail)
