# ERROR: JSON object must be str, bytes or bytearray, not 'NoneType'

- **ID:** `python/pip-invalid-json-from-index`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The PyPI index server returned an empty or non-JSON response, often due to network issues or server errors.

## Version Compatibility

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

## Workarounds

1. **Use a different index or mirror** (85% success)
   ```
   pip install package -i https://pypi.douban.com/simple/
   ```
2. **Check network connectivity and proxy settings** (80% success)
   ```
   curl https://pypi.org/simple/package/
# If fails, configure proxy: pip install --proxy http://proxy:port package
   ```

## Dead Ends

- **Retrying with --retries=10** — Server issue may persist; retries don't fix malformed response. (80% fail)
- **Using --no-cache-dir** — Cache is not the cause; server response is invalid. (90% fail)
