title: IOError: wkhtmltopdf exited with non-zero code 1. error: [blank]
body: <p>I have been attempting to use pdfkit/wkhtmltopdf, but when I use it, I get the following error with the final error blank:</p>
  
  <pre><code> File "email_app.py", line 118, in &lt;module&gt;
      send_mail()
    File "email_app.py", line 114, in send_mail
      RECEIPT_UNITS_YTD, RECEIPT_COST_YTD, RECEIPT_UNITS_MONTH_YOY, RECEIPT_COST_MONTH_YOY, RECEIPT_UNITS_YTD_YOY, RECEIPT_COST_YTD_YOY)
    File "/local/scripts/algos.py", line 1321, in no_issue
      pdfkit.from_file('/local/scripts/file'+VENDOR_ID+'.html','VendorScorecard_'+VENDOR_ID+'.pdf',cover='/local/scripts/cover'+VENDOR_ID+'.html')
    File "/usr/local/lib/python2.7/dist-packages/pdfkit/api.py", line 46, in from_file
      return r.to_pdf(output_path)
    File "/usr/local/lib/python2.7/dist-packages/pdfkit/pdfkit.py", line 119, in to_pdf
      raise IOError("wkhtmltopdf exited with non-zero code {0}. error:\n{1}".format(exit_code, stderr.decode("utf-8")))
  IOError: wkhtmltopdf exited with non-zero code 1. error:
  </code></pre>
  
  <p>Additionally, you can see the snippet of code where pdfkit.from_file is called:</p>
  
  <pre><code>f = open("file"+VENDOR_ID+".html","w")
  cover = open("cover"+VENDOR_ID+".html","w")
  email = open("email"+VENDOR_ID+".html","w")
  email_body = email.write(text+no_issues)
  asin_det = f.write(asin)
  t = cover.write(body)
  f.close()
  cover.close()
  email.close()
  pdfkit.from_file('/local/scripts/file'+VENDOR_ID+'.html','VendorScorecard_'+VENDOR_ID+'.pdf',cover='/local/scripts/cover'+VENDOR_ID+'.html')
  </code></pre>
  
  <p>I have scoured the internet to find an answer, but most of them suggest that I need to install xvfb, which I have already done. In fact, if I just run <code>wkhtmltopdf http://www.google.com output.pdf</code>, it works like a charm. I'm on a Linux with Ubuntu 12.04.</p>
  
  <p>When I run the exact same code on a Windows desktop, it works as intended -- spitting out a really beautiful PDF.</p>