Я попробовал установить pdfkit Python API на моем компьютере с Windows 8. Я получаю проблемы, связанные с пути.
Traceback (most recent call last):
File "C:\Python27\pdfcre", line 13, in <module>
pdfkit.from_url('http://google.com', 'out.pdf')
File "C:\Python27\lib\site-packages\pdfkit\api.py", line 22, in from_url
configuration=configuration)
File "C:\Python27\lib\site-packages\pdfkit\pdfkit.py", line 38, in __init__
self.configuration = (Configuration() if configuration is None
File "C:\Python27\lib\site-packages\pdfkit\configuration.py", line 27, in __init__
'https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf' % self.wkhtmltopdf)
IOError: No wkhtmltopdf executable found: ""
If this file exists please check that this process can read it. Otherwise please install wkhtmltopdf - https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf
Кто-нибудь установил Python PDFKIt на машине Windows? Как устранить эту ошибку.
Мой пример кода:
import pdfkit
import os
config = pdfkit.configuration(wkhtmltopdf='C:\\Python27\\wkhtmltopdf\bin\\wkhtmltopdf.exe')
pdfkit.from_url('http://google.com', 'out.pdf')