I have pytest-html installed but I'm getting this error everytime i try to generate a report.
I've come across same issue, but with a different option. It got resolved by updating pytest version from pytest-5.3.2 to pytest-5.4.3
python -m pip install --upgrade
This will install latest version of pytest.