python_scripts icon indicating copy to clipboard operation
python_scripts copied to clipboard

OSError: wkhtmltopdf exited with non-zero code -6. error:

Open xpguan opened this issue 8 years ago • 5 comments

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 "/usr/local/lib/python3.4/dist-packages/pdfkit/api.py", line 49, in from_file return r.to_pdf(output_path) File "/usr/local/lib/python3.4/dist-packages/pdfkit/pdfkit.py", line 159, in to_pdf raise IOError("wkhtmltopdf exited with non-zero code {0}. error:\n{1}".format(exit_code, stderr)) OSError: wkhtmltopdf exited with non-zero code -6. error: The switch --outline-depth, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display

xpguan avatar Apr 21 '17 07:04 xpguan

换了wkhtmltopdf的版本之后就好了!

xpguan avatar Apr 21 '17 09:04 xpguan

https://stackoverflow.com/questions/18758589/wkhtmltopdf-installation-error-on-ubuntu

进行到第三步的时候 连不上外网的ip就是下载不了

rockyfire avatar Aug 09 '17 12:08 rockyfire

@xpguan 请问换哪个版本的?

HowinLoo avatar Oct 19 '17 08:10 HowinLoo

install 0.12.4 version from official web-site Works for me.

dmitryTsatsarin avatar May 05 '18 16:05 dmitryTsatsarin

I'm getting an exit code of -9 with 0.12.4. wkhtmltopdf exited with non-zero code -9

Can someone please suggest how to fix this issue.

d3prof3t avatar Aug 21 '18 11:08 d3prof3t