找到 X:\Python3.X\Lib\site-packages\pytest_html\plugin.py
修改此行代码:
class TestResult:
def __init__(self, outcome, report, logfile, config):
#self.test_id = report.nodeid.encode("utf-8").decode("unicode_escape")
self.test_id = report.nodeid