cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Esteemed Contributor III
Esteemed Contributor III

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!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.