HostNotFoundError : wkhtmltopdf reported an error

56 Views Asked by At

I ran into an error when where I don't have internet connection to the outside and the mobsf is hosted remotely using a domain name, what could be the issues based on the error below?

Traceback (most recent call last):
  File "/mobsf/StaticAnalyzer/views/common/pdf.py", line 135, in pdf
    pdf_dat = pdfkit.from_string(html, False, options=options)
  File "/venv/lib/python3.8/site-packages/pdfkit/api.py", line 75, in from_string
    return r.to_pdf(output_path)
  File "/venv/lib/python3.8/site-packages/pdfkit/pdfkit.py", line 201, in to_pdf
    self.handle_error(exit_code, stderr)
  File "/venv/lib/python3.8/site-packages/pdfkit/pdfkit.py", line 155, in handle_error
    raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: HostNotFoundError

0

There are 0 best solutions below