pdfkit Exit with code 1 due to network error: ProtocolUnknownError错误原因以及解决方法

原因是本地文件访问权限被禁止了
解决方法:

pdfkit.from_string(body,"test.pdf")

变成

pdfkit.from_string(body,"test.pdf",options={"enable-local-file-access":True})

你可能感兴趣的:(pdfkit,python,error,network)