几个月前,我创建了一个小脚本来将URL转换为PDF文件,今天早上我试图转换另一个链接,但我从py提示符那里得到了这个错误:
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\pdfkit\api.py", line 24, in from_url
configuration=configuration, cover_first=cover_first)
File "C:\Python27\lib\site-packages\pdfkit\pdfkit.py", line 42, 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我用谷歌搜索了很多,但还是找不到解决方案。有人能帮我吗?
发布于 2017-01-13 19:16:44
我找到了解决方案,我不知道为什么,但python将我的环境路径"C:\Program Files\wkhtmltopdf\bin“替换为"C:\Program Files\wkhtmltopdin”,因为"\b“,所以我只是将"\b”替换为"/b“并求解。
https://stackoverflow.com/questions/41631479
复制相似问题