在影刀中调用wkhtmltopdf,报错,电脑中已安装
回答
收藏

在影刀中调用wkhtmltopdf,报错,电脑中已安装

a
artfaa
2024-01-19 20:16·浏览量:139
a
artfaa
发布于 2024-01-19 20:16139浏览

//github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf

��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ���


Traceback (most recent call last):

 File "C:\Users\40996\AppData\Local\ShadowBot\users\630652565290377218\apps\41af5394-8f10-4052-b7de-aeb390ed6d1c\venv\lib\site-packages\pdfkit\configuration.py", line 35, in __init__

   with open(self.wkhtmltopdf) as f:

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:\Program Files (x86)\ShadowBot\shadowbot-5.14.38\python\lib\runpy.py", line 193, in _run_module_as_main

   "__main__", mod_spec)

 File "C:\Program Files (x86)\ShadowBot\shadowbot-5.14.38\python\lib\runpy.py", line 85, in _run_code

   exec(code, run_globals)

 File "C:\Program Files (x86)\ShadowBot\shadowbot-5.14.38\python\lib\site-packages\xbot_interpreter.py", line 97, in <module>

   main()

 File "C:\Program Files (x86)\ShadowBot\shadowbot-5.14.38\python\lib\site-packages\xbot_interpreter.py", line 57, in main

   try:

 File "C:\Users\40996\AppData\Local\ShadowBot\users\630652565290377218\apps\41af5394-8f10-4052-b7de-aeb390ed6d1c\xbot_robot\process44.py", line 20, in main

   }, _block=("子流程1", 3, "调用模块"))

 File "<string>", line 89, in wrapper

 File "<string>", line 84, in wrapper

 File "<string>", line 37, in invoke_module

 File "C:\Users\40996\AppData\Local\ShadowBot\users\630652565290377218\apps\41af5394-8f10-4052-b7de-aeb390ed6d1c\xbot_robot\module3.py", line 7, in convert_html_to_image

   pdfkit.from_file(html_file_path, pdf_file_path)

 File "C:\Users\40996\AppData\Local\ShadowBot\users\630652565290377218\apps\41af5394-8f10-4052-b7de-aeb390ed6d1c\venv\lib\site-packages\pdfkit\api.py", line 49, in from_file

   configuration=configuration, cover_first=cover_first, verbose=verbose)

 File "C:\Users\40996\AppData\Local\ShadowBot\users\630652565290377218\apps\41af5394-8f10-4052-b7de-aeb390ed6d1c\venv\lib\site-packages\pdfkit\pdfkit.py", line 45, in __init__

   self.configuration = (Configuration() if configuration is None

 File "C:\Users\40996\AppData\Local\ShadowBot\users\630652565290377218\apps\41af5394-8f10-4052-b7de-aeb390ed6d1c\venv\lib\site-packages\pdfkit\configuration.py", line 42, in __init__

   'https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf' % self.wkhtmltopdf)

OSError: No wkhtmltopdf executable found: "b''"

If this file exists please check that this process can read it or you can pass path to it manually in method call, check README. Otherwise please install wkhtmltopdf - https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf


尝试过的方案

已重启电脑和重装wkhtmltopdf

收藏
全部回答1
最新
发布回答
回答