From 03e54a8f44f6115b0a8fd8e4fc9bb5c5e1f0d1b8 Mon Sep 17 00:00:00 2001 From: Gabriele De Rosa <4183824+derogab@users.noreply.github.com> Date: Sun, 3 Oct 2021 00:17:10 +0200 Subject: [PATCH] Bug fix More info: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4460#issuecomment-661345113 --- bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index f5f0a42..717dd97 100644 --- a/bot.py +++ b/bot.py @@ -120,8 +120,10 @@ def generate(df, target, template): wf.write("\n" + line) # Generate plot filename results_filename = 'results_' + sf + '.png' + # Set imgkit options + options = {'enable-local-file-access': None} # Create results image/png - imgkit.from_file('out/' + webpage_filename, 'out/' + results_filename) + imgkit.from_file('out/' + webpage_filename, 'out/' + results_filename, options=options) # Return out data return {