Getting server error while creating pdf

i am very new to this forum. recently installed erpnext in digital ocean docker. i am getting error while trying to generate pdf. Please suggest. log attached.

Traceback (most recent call last):
File “apps/frappe/frappe/”, line 66, in application
response = frappe.api.handle()
File “apps/frappe/frappe/”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/”, line 31, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/”, line 68, in execute_cmd
return, **frappe.form_dict)
File “apps/frappe/frappe/”, line 1229, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/utils/”, line 93, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File “apps/frappe/frappe/utils/”, line 37, in get_pdf
filedata = pdfkit.from_string(html, False, options=options or {})
File “env/lib/python3.9/site-packages/pdfkit/”, line 72, in from_string
return r.to_pdf(output_path)
File “env/lib/python3.9/site-packages/pdfkit/”, line 156, in to_pdf
raise IOError(‘wkhtmltopdf reported an error:\n’ + stderr)
OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: ConnectionRefusedError

Add the following code in file (36 th line)

options = {
“enable-local-file-access”: None,
“quiet”: “”