# ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/req/req_file.py", line 84, in parse_requirements
    line = line.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

- **ID:** `python/pip-unicode-decode-error-requirements`
- **Domain:** python
- **Category:** encoding_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The requirements file is not encoded in UTF-8, often due to Windows tools saving as UTF-16 or Latin-1.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Convert the file to UTF-8: `iconv -f UTF-16 -t UTF-8 requirements.txt > requirements_utf8.txt`.
   ```
2. **** (95% success)
   ```
   In a text editor, save as UTF-8 without BOM.
   ```

## Dead Ends

- **** — Loses content; may not fix encoding if the tool saves in wrong format again. (70% fail)
- **** — Still reads the file and fails on encoding. (90% fail)
