我正在工作的环境:
这是我的example.py
import os
import imgkit
imgkit.from_url('http://google.com', 'C:\out.jpg')
由于此代码清楚地显示我正在尝试使用Google网站的屏幕截图。但是当我在Windows 10平台上运行此代码时,我得到了这个错误。
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
File "C:\testdns.py", line 3, in <module>
imgkit.from_url('http://google.com', 'C:\out.jpg')
File "C:\Python27\lib\site-packages\imgkit\api.py", line 32, in from_url
return rtn.to_img(output_path)
File "C:\Python27\lib\site-packages\imgkit\imgkit.py", line 240, in to_img
raise IOError('wkhtmltoimage reported an error:\n' + stderr)
IOError: wkhtmltoimage reported an error:
Loading page (1/2)
Rendering (2/2)
Error: Could not write to output file
Error: Could not save image
Done
Exit with code 1, due to unknown error.
现在我不知道如何继续