Python pdfkit не переобразует файл с изображением

есть цикл который получает список html файлов и дальше циклом должен создать pdf файлы но вот беда он педает с ошибкой блокирования файла и создает только первый pdf но и тот без картинки цикл создания pdf:

for i in list_svod:
    path_wkthmltopdf = b'C:\Program Files\wkhtmltopdf\\bin\wkhtmltopdf.exe'
    config = pdfkit.configuration(wkhtmltopdf=path_wkthmltopdf)
    css = 'style.css'
    options = {
        'orientation': 'landscape',
        'margin-bottom': '0in',
        'margin-left': '0in',
        'margin-right': '0in',
        'margin-top': '0in',
        'page-size': 'a4',
        'page-height': '10in',
        'page-width': '7.12in',
    }
    pdfkit.from_file(str(i[1]) + ".html", str(i[1]) + ".pdf", configuration=config, options=options, css=css)

текст ошибки:

Traceback (most recent call last):
  File "E:/PycharmProjects/untitled/pdf_to_cert/parser.py", line 40, in <module>
    pdfkit.from_file(str(i[1]) + ".html", str(i[1]) + ".pdf", configuration=config, options=options, css=css)
  File "C:\Python3\lib\site-packages\pdfkit\api.py", line 49, in from_file
    return r.to_pdf(output_path)
  File "C:\Python3\lib\site-packages\pdfkit\pdfkit.py", line 156, in to_pdf
    raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Loading pages (1/6)
Warning: Blocked access to file                                   
Warning: Blocked access to file 
Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown
Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown
Counting pages (2/6)                                               
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)
Done                                                                      
Exit with code 1 due to network error: ProtocolUnknownError


Process finished with exit code 1

в html путь указан относительный тк картинка находиться в корне пробовал писать и полный но результат один и тот же


Ответы (0 шт):