IMGKIT fails to load css and image

526 Views Asked by At

I am quite new to html. I'm trying to convert html files into jpg using Imgkit.

The code I use is:

''' import imgkit

css = ['main.css']

with open('arm2_A_app_n4_info.html') as f: imgkit.from_file(f, 'out.jpg') '''

but I get the command line error:

Loading page (1/2) Warning: Failed to load file:///var/folders/gr/r57dtt0n14n6cc6k436g6_nnz30mxq/T/assets/css/main.css (ignore) Warning: Failed to load file:///var/folders/gr/r57dtt0n14n6cc6k436g6_nnz30mxq/T/images/3_thin.jpg (ignore) Rendering (2/2)

The html files loads everything properly, tho. The result is that the image produced is not formatted and does not show the image.

Any idea what might be going wrong?

Thanka!

0

There are 0 best solutions below