mark
mark

Reputation: 673

Errno 2 No such file or directory in django-wkhtmltopdf

I got a project in which the document is generated using the django-wkhtmltopdf. It seems that everything is ok, but when I click to download the document I get the error:

OSError at /users/doc-in-pdf/51/

[Errno 2] No such file or directory

Request Method:     GET
Request URL:    http://localhost:8080/users/doc-in-pdf/51/
Django Version:     1.5.4
Exception Type:     OSError
Exception Value:    

[Errno 2] No such file or directory

Exception Location:     /usr/lib/python2.7/subprocess.py in _execute_child, line 1249
Python Executable:  /home/vagrant/envs/vagrant/bin/python
Python Version:     2.7.3

In the console, I get the following address:

[18/Feb/2015 07:41:14] "GET /users/doc-in-pdf/51/ HTTP/1.1" 500 93487

Upvotes: 0

Views: 2301

Answers (1)

James Lin
James Lin

Reputation: 26608

Try adding this to your settings.py

WKHTMLTOPDF_CMD = '/usr/local/bin/wkhtmltopdf'

Upvotes: 2

Related Questions