python_scripts icon indicating copy to clipboard operation
python_scripts copied to clipboard

后半部分的好多图片下载失败,是不是wkhtmltopdf分配的缓存太小了

Open ghost opened this issue 8 years ago • 0 comments

周半部分的好多图片下载失败,是不是wkhtmltopdf分配的缓存太小了。因为失败的图片总是后半部分的图。而错误信息也没有提示什么有用的: Traceback (most recent call last): File "crawler.py", line 165, in crawler.run() File "crawler.py", line 99, in run pdfkit.from_file(htmls, self.name + ".pdf", options=options) File "D:\Program Files\Python36\lib\site-packages\pdfkit\api.py", line 49, in from_file return r.to_pdf(output_path) File "D:\Program Files\Python36\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 file:///static/img/404.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

ghost avatar Apr 05 '17 05:04 ghost