# TypeError: ids must be a list of strings or None, got <class 'int'>

- **ID:** `python/pytest-parametrize-ids-none`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在@pytest.mark.parametrize中，ids参数传入了非字符串类型，如整数。

## Version Compatibility

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

## Workarounds

1. **** (100% success)
   ```
   @pytest.mark.parametrize('param', [1, 2], ids=['one', 'two'])
   ```
2. **** (95% success)
   ```
   def id_fn(val):
    return f'param_{val}'
@pytest.mark.parametrize('param', [1, 2], ids=id_fn)
   ```

## Dead Ends

- **** — 如果转换不当，可能生成重复id。 (70% fail)
- **** — 测试报告可读性下降。 (50% fail)
