Среда, в которой я сейчас работаю:
- Windows 10
- Python27
- wkhtmltoimage 0.12.4
- модуль imgkit
Это мой 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.
Теперь я не знаю, как действовать