0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

No wkhtmltopdf executable found: "b''" エラー対応

Posted at

wkhtmltopdfのエラー

コマンドラインでは実行できるのに cronで実行できない場合など

localhost CROND[1691593]: (root) CMDOUT (No wkhtmltopdf executable found: "b''")
localhost CROND[1691593]: (root) CMDOUT (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のパスが見つからないため

Pythonのコードのでwkhtmltopdfのパスを認識できるようにする

import os

# wkhtmltopdfのパスを環境変数に設定
os.environ['PATH'] += ':/usr/local/bin/'
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?