python install_error ai_generated true

错误: 用法: pytest [选项] [文件或目录] [文件或目录] [...] pytest: 错误: 无法识别的参数: --html=report.html

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

ID: python/pytest-html-report-missing

其他格式: JSON · Markdown 中文 · English
80%修复率
95%置信度
0证据数
2024-01-15首次发现

版本兼容性

版本状态引入弃用备注
3.2 active

根因分析

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

English

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

generic

解决方案

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

无效尝试

常见但无效的做法:

  1. 90% 失败

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

  2. 80% 失败

    This loses the HTML report functionality.