python_scripts
python_scripts copied to clipboard
win7转pdf时候提示wkhtmltopdf reported an error
File "crawler.py", line 163, in <module>
crawler.run()
File "crawler.py", line 97, in run
pdfkit.from_file(htmls, self.name + ".pdf", options=options)
File "C:\Anaconda3\envs\py3-dj\lib\site-packages\pdfkit\api.py", line 49, in from_file
return r.to_pdf(output_path)
File "C:\Anaconda3\envs\py3-dj\lib\site-packages\pdfkit\pdfkit.py", line 156, in to_pdf
raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Loading pages (1/6)
Warning: Failed to load http://www.liaoxuefeng.comhttp//service.t.sina.com.cn/widget/qmd/1658384301/078cedea/2.png (ignore)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
Exit with code 1 due to network error: ProtocolUnknownError
所以要怎么解决???解决了吗??
Traceback (most recent call last):
File "D:\install\pthon-3.10\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in