# with open(f"WebServer_html/{path}","r",encoding="UTF-8") as f: with open(f"WebServer_html/{path}","r",encoding="UTF-8",errors='ignore') as f:
在encoding参数后面加上,errors参数并设置为’ignore’。亲测有效