cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

feed
New Contributor III

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

Can anyone help me how can i solve this error

4 REPLIES 4

Anonymous
Not applicable

@feed expedition​ :

The error message indicates that the wkhtmltopdf executable file cannot be found. This file is required by the pdfkit library to generate PDF files.

You can try the following steps to resolve the issue:

  1. Install wkhtmltopdf on your system:
  • For Linux systems, you can try running the following command in your terminal:
  1. If you have already installed wkhtmltopdf make sure that it is added to the PATH environment variable. You can check this by running echo $PATH on Linux or echo %PATH% on Windows.
  2. If wkhtmltopdf is installed but still cannot be found, you can try passing the path to the pdfkit function manually. For example:
import pdfkit
 
# Set the path to wkhtmltopdf executable file
path_wkhtmltopdf = '/usr/local/bin/wkhtmltopdf'  # This may vary depending on your system
config = pdfkit.configuration(wkhtmltopdf=path_wkhtmltopdf)
 
# Use the configuration when generating PDF
pdfkit.from_url('http://google.com', 'out.pdf', configuration=config)

I hope this helps you to resolve the issue.

jchhhh
New Contributor II

Thank you sooooooo much!! I met this problem, too, and it works!

Anonymous
Not applicable

Hi @feed expedition​ 

Thank you for posting your question in our community!

Share the wisdom! By marking the best answers, you help others in our community find valuable information quickly and efficiently.

Debayan
Databricks Employee
Databricks Employee

Hi, When did you receive this error? running a code insde a notebook , or running a cluster? or a job?

Also, please tag @Debayan​ with your next response which will notify me. Thank you!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group