python之ValueError: binary mode doesn‘t take an encoding argument报错的解决方式
代码:
with open(report_path, mode='wb', encoding='utf-8') as file:
runner = HTMLTestRunnerNew.HTMLTestRunner(stream=file,
title="123",
verbosity=2,
description="123")
runner.run(suite)
在运行该pytho脚本的时候报错提示:Traceback (most recent call last): File "F:/pythonProject/Api/run.py", line 9, in
python之ValueError: binary mode doesn‘t take an encoding argument报错的解决方式最先出现在Python成神之路。
共有 0 条评论