# ValueError: line 1 of the docstring for mypkg.mod lacks blank line after the examples

- **ID:** `python/pytest-doctest-module-not-found`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pytest --doctest-modules parses docstrings as doctests; missing blank line after '>>>' block or malformed indentation triggers this ValueError during collection.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## Workarounds

1. **** (94% success)
   ```
   def add(a, b):
    """Return a + b.

    >>> add(1, 2)
    3

    """
    return a + b
   ```
2. **** (88% success)
   ```
   # pyproject.toml
[tool.pytest.ini_options]
addopts = "--doctest-modules"
doctest_optionflags = ["NORMALIZE_WHITESPACE", "ELLIPSIS"]
   ```

## Dead Ends

- **** — Skips legitimate doctests and hides the formatting bug; other modules with the same issue still fail. (70% fail)
- **** — Loses documentation and breaks help() output; doesn't address the formatting pattern for future modules. (75% fail)
