2017-11-13 3 views
0

Ich bin ein Neuling für Python, während ich imgkit (PI-Modul) lernte, bekam ich diesen Fehler, der für einen einfachen Code nicht erwartet wurde. Unten ist der CodeUnerwarteter Fehler bei der Ausführung von imgkit

import imgkit 

imgkit.from_url('https://www.google.co.in/','fs.jpg') 

und die Fehler, die ich habe ist

Traceback (most recent call last): 
    File "G:\python\lib\site-packages\imgkit-0.1.8-py3.6.egg\imgkit\config.py", line 30, in __init__ 
    with open(self.wkhtmltoimage): 
FileNotFoundError: [Errno 2] No such file or directory: b'' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Users\ALEXANDER\Desktop\def img.py", line 3, in <module> 
    imgkit.from_url('https://www.google.co.in/','fs.jpg') 
    File "G:\python\lib\site-packages\imgkit-0.1.8-py3.6.egg\imgkit\api.py", line 20, in from_url 
    rtn = IMGKit(url, 'url', options=options, toc=toc, cover=cover, config=config, cover_first=cover_first) 
    File "G:\python\lib\site-packages\imgkit-0.1.8-py3.6.egg\imgkit\imgkit.py", line 34, in __init__ 
    self.config = Config() if not config else config 
    File "G:\python\lib\site-packages\imgkit-0.1.8-py3.6.egg\imgkit\config.py", line 36, in __init__ 
    'http://wkhtmltopdf.org\n'.format(self.wkhtmltoimage)) 
OSError: No wkhtmltoimage executable found: "b''" 
If this file exists please check that this process can read it. Otherwise please install wkhtmltopdf - http://wkhtmltopdf.org 

Könnte mir jemand sagen, was Fehler, den ich gemacht habe.

+0

Fehler sagte "Wenn diese Datei existiert ... bitte installieren wkhtmltopdf - http://wkhtmltopdf.org." Versuchen Sie also, dieses Modul zu installieren. – DRPK

Antwort

0

Es sieht so aus, als müssten Sie wkhtmltopdf installieren. Um dies zu tun, führen Sie pip install wkhtmltopdf

+0

Ich hatte versucht zu installieren wkhtmltopdf Installation wird nicht abgeschlossen [Link] (https://imgur.com/a/ooBNU) heruntergeladen eine neue Kopie von Pypi noch das gleiche Ergebnis. Sogar mit wkhtmltopdf 0.1 versucht, aber kein Fortschritt. Ist jemand anderes auf dieses Problem gestoßen? – oneclick

Verwandte Themen