python install_error ai_generated true

ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...] pytest: error: unrecognized arguments: --html=report.html

ID: python/pytest-html-report-missing

Also available as: JSON · Markdown · 中文
80%Fix Rate
95%Confidence
0Evidence
2024-01-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.2 active

Root Cause

The pytest-html plugin is not installed, so the --html option is not recognized.

generic

中文

pytest-html 插件未安装,因此无法识别 --html 选项。

Workarounds

  1. 98% success
    Run: pip install pytest-html
  2. 95% success
    Add 'pytest-html' to requirements.txt and reinstall dependencies.

Dead Ends

Common approaches that don't work:

  1. 90% fail

    This generates a different format and doesn't provide HTML reports.

  2. 80% fail

    This loses the HTML report functionality.