1、报错截图
2、 解决方法:
(1)py2:
从http://tungwaiyip.info/software/HTMLTestRunner.html下载HTMLTestRunner.py并将文件放到python2安装目录的Lib下,然后再次运行文件,可成功运行!
(2) py3:
a: 从http://tungwaiyip.info/software/HTMLTestRunner.html下载HTMLTestRunner.py
b:HTMLTestRunner.py 记事本打开方式打开
c:更改个别配置:(快捷Ctrl+查找)
将import StringIO修改成import io;
将self.outputBuffer = StringIO.StringIO()修改成self.outputBuffer = io.StringIO();
将if not rmap.has_key(cls):修改成if not cls in rmap:
将uo = o.decode(‘latin-1‘)修改成uo = e;
将ue = e.decode(‘latin-1‘)修改成ue = e;
将print >> sys.stderr,‘\nTime Elapsed:%s‘%(self.stopTime-self.startTime)修改成print(sys.stderr,‘\nTime Elapsed:%s‘%(self.stopTime-self.startTime))
d:将更改后的HTMLTestRunner.py文件放到python3安装目录的Lib下,然后再次运行文件,可成功运行!
- ModuleNotFoundError HTMLTestRunner python module 问题modulenotfounderror htmltestrunner python module modulenotfounderror python3 python module modulenotfounderror encodings python module modulenotfounderror脚本python module modulenotfounderror经验python module modulenotfounderror exceptions module问题 modulenotfounderror python module flask modulenotfounderror module named 39 modulenotfounderror watchdog module named modulenotfounderror resultlog module pytest