I have searched the forum for similar issues
on
This category is for issues regarding specific apps, NOT general issues with YunoHost.
on
This form is written in English but feel free to write in French if you’re more comfortable!
on
What app is this about, and its version
Dokos
What YunoHost version are you running
12.1.40.1
What type of hardware are you using
Old laptop or computer
Describe your issue
So I’ve been using Dokos/ERPnext exclusively for running my small business for months now with no hiccups. Thought I was on cloud 9. Just recently I noticed a couple of invoices going overdue. Turned out for about 3 weeks my invoices had been intermittently failing to send, before in the last week not sending at all. Thought at first it was an email issue (I’m using Proton with a headless smtp bridge) but seems it’s actually the PDF generation. Dokos is sending off the html to wkhtmltopdf asking for the PDF and nothing happens. Nginx times out and the whole ERPnext stack crashes for up to 10 mins. I’ve tracked the problem’s start back to around the time of recent Yunohost updates, but haven’t been able to narrow anything else. I can preview an invoice, but can’t view or email any. I’ve now spent days trying to fix it but I’m completely lost, resorting to printing screenshots of invoices and emailing them from my PC. I need help. Does anyone have a clue to what might be happening?
Share relevant logs or error messages
Traceback with variables (most recent call last):
File “apps/frappe/frappe/email/queue.py”, line 146, in flush
email_queue.send()
EmailQueue = <class ‘frappe.email.doctype.email_queue.email_queue.EmailQueue’>
email_queue_batch = [{‘name’: ‘79dcq5islc’, ‘sender’: ‘Damien the Handyman info@damohandyman.org’}]
failed_email_queues =
row = {‘name’: ‘79dcq5islc’, ‘sender’: ‘Damien the Handyman info@damohandyman.org’}
email_queue = <EmailQueue: 79dcq5islc>
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 179, in send
message = ctx.build_message(recipient.recipient)
self = <EmailQueue: 79dcq5islc>
smtp_server_instance = None
frappe_mail_client = None
force_send = False
ctx = <frappe.email.doctype.email_queue.email_queue.SendMailContext object at 0x7f2d7b063750>
message = None
recipient = <EmailQueueRecipient: 3okuog6r68 parent=79dcq5islc>
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 323, in build_message
message = self.include_attachments(message)
self = <frappe.email.doctype.email_queue.email_queue.SendMailContext object at 0x7f2d7b063750>
recipient_email = ‘karincretney7@gmail.com’
message = ‘Content-Type: multipart/mixed; boundary=“===============2912229955170174292==”\r\nMIME-Version: 1.0\r\nMessage-Id: 178781608206.1353636.13702043866275210612@erp.damocal.nohost.me\r\nList-Unsubscribe: info@damohandyman.org\r\nX-Original-From: Damien Malcolm damo@damocal.nohost.me\r\nSubject: Your Invoice from Damien L Malcolm\r\nFrom: Damien the Handyman info@damohandyman.org\r\nTo: karincretney7@gmail.com\r\nDate: Thu, 27 Aug 2026 07:34:44 -0000\r\nReply-To: info@damohandyman.org\r\nX-Frappe-Site: https://erp.damocal.nohost.me:8001\r\n\r\n–===============2912229955170174292==\r\nContent-Type: multipart/alternative; boundary=“===============3143046230178967126==”\r\nMIME-Version: 1.0\r\n\r\n–===============3143046230178967126==\r\nContent-Type: text/plain; charset=“utf-8”\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\nYour Invoice from Damien L Malcolm\r\n\r\nG'day,\r\n\r\nThank you for hiring me. Your invoice is attached as PDF, which can be view=...
File “apps/frappe/frappe/email/doctype/email_queue/email_queue.py”, line 400, in include_attachments
print_format_file = frappe.attach_print(attachment)
self = <frappe.email.doctype.email_queue.email_queue.SendMailContext object at 0x7f2d7b063750>
message = 'Content-Type: multipart/mixed; boundary=“===============2912229955170174292==”\r\nMIME-Version: 1.0\r\nMessage-Id: 178781608206.1353636.13702043866275210612@erp.damocal.nohost.me\r\nList-Unsubscribe: info@damohandyman.org\r\nX-Original-From: Damien Malcolm damo@damocal.nohost.me\r\nSubject: Your Invoice from Damien L Malcolm\r\nFrom: Damien the Handyman info@damohandyman.org\r\nTo: karincretney7@gmail.com\r\nDate: Thu, 27 Aug 2026 07:34:44 -0000\r\nReply-To: info@damohandyman.org\r\nX-Frappe-Site: https://erp.damocal.nohost.me:8001\r\n\r\n–===============2912229955170174292==\r\nContent-Type: multipart/alternative; boundary=“===============3143046230178967126==”\r\nMIME-Version: 1.0\r\n\r\n–===============3143046230178967126==\r\nContent-Type: text/plain; charset=“utf-8”\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\nYour Invoice from Damien L Malcolm\r\n\r\nG'day,\r\n\r\nThank you for hiring me. Your invoice is attached as PDF, which can be view=...
message_obj = <email.message.EmailMessage object at 0x7f2d7b0df290>
attachments = [{‘print_format’: ‘Handyman Invoice’, ‘html’: ‘’, ‘doctype’: ‘Sales Invoice’, ‘name’: ‘INV-07977’, ‘lang’: ‘en-GB’, ‘print_letterhead’: ‘1’}]
attachment = {‘print_format’: ‘Handyman Invoice’, ‘html’: ‘’, ‘doctype’: ‘Sales Invoice’, ‘name’: ‘INV-07977’, ‘lang’: ‘en-GB’, ‘print_letterhead’: ‘1’}
file_filters = {}
File “apps/frappe/frappe/init.py”, line 2173, in attach_print
else get_print(doctype, name, kwargs)
doctype = ‘Sales Invoice’
name = ‘INV-07977’
file_name = None
print_format = ‘Handyman Invoice’
style = None
html = ‘’
doc = None
lang = ‘en-GB’
print_letterhead = ‘1’
password = ********
letterhead = None
print_language = <function print_language at 0x7f2d80a03240>
scrub_urls = <function scrub_urls at 0x7f2d834e96c0>
get_pdf = <function get_pdf at 0x7f2d7b05e660>
print_settings = {‘add_draft_heading’: ‘1’, ‘allow_page_break_inside_tables’: ‘0’, ‘allow_print_for_cancelled’: ‘1’, ‘allow_print_for_draft’: ‘1’, ‘compact_item_print’: ‘0’, ‘creation’: None, ‘docstatus’: ‘0’, ‘enable_print_server’: ‘0’, ‘enable_raw_printing’: ‘0’, ‘font’: ‘Default’, ‘font_size’: ‘9’, ‘idx’: ‘0’, ‘modified’: ‘2026-06-12 08:56:34.626914’, ‘modified_by’: ‘damo@damocal.nohost.me’, ‘name’: ‘Print Settings’, ‘owner’: ‘Administrator’, ‘pdf_page_height’: ‘0’, ‘pdf_page_size’: ‘A4’, ‘pdf_page_width’: ‘0’, ‘print_style’: ‘Modern’, ‘print_taxes_with_zero_amount’: ‘0’, ‘print_uom_after_quantity’: ‘0’, ‘repeat_header_footer’: ‘0’, ‘send_print_as_pdf’: ‘1’, ‘with_letterhead’: ‘1’}
kwargs = {‘print_format’: ‘Handyman Invoice’, ‘style’: None, ‘doc’: None, ‘no_letterhead’: False, ‘letterhead’: None, ‘password’: '****’, ‘as_pdf’: True}
content = ‘’
ext = ‘.pdf’
File “apps/frappe/frappe/utils/print_utils.py”, line 96, in get_print
return get_pdf(
doctype = ‘Sales Invoice’
name = ‘INV-07977’
print_format = ‘Handyman Invoice’
style = None
as_pdf = True
doc = <SalesInvoice: INV-07977 docstatus=1>
output = None
no_letterhead = False
password = ********
pdf_options = {}
letterhead = None
pdf_generator = ‘wkhtmltopdf’
copy = <module ‘copy’ from ‘/usr/lib/python3.11/copy.py’>
now = <function now at 0x7f2d834e4cc0>
get_pdf = <function get_pdf at 0x7f2d7b05e660>
get_response_without_exception_handling = <function get_response_without_exception_handling at 0x7f2d7b0e1ee0>
local = <werkzeug.local.Local object at 0x7f2d834f3190>
original_form_dict = {‘pdf_generator’: ‘wkhtmltopdf’}
response = <Response 18938 bytes [200 OK]>
html = '\n\n\n\t\n\t\n\t\n\tERPnext - Karin Cretney\n\t\n\t\n\t\n\t\t\n\t\t@media screen {\n\t.print-format-gutter {\n\t\tbackground-color: #d1d8dd;\n\t\tpadding: 30px 0px;\n\t}\n\t.print-format {\n\t\tbackground-color: white;\n\t\tborder-radius: 8px;\n\t\tmax-width: 8.3in;\n\t\tmin-height: 11.69in;\n\t\tpadding: 0.75in;\n\t\tmargin: auto;\n\t\tcolor: var(–gray-900);\n\t}\n\n\t.print-format.landscape {\n\t\tmax-width: 11.69in;\n\t\tpadding: 0.2in;\n\t}\n\n\t.page-break {\n\t\t/* padding: 15px 0px; /\n\t\tborder-bottom: 1px dashed #888;\n\t}\n\n\t/ .page-break:first-child {\n\t\tpadding-top: 0px;\n\t} /\n\n\t.page-break:last-child {\n\t\tborder-bottom: 0px;…
File “apps/frappe/frappe/utils/pdf.py”, line 97, in get_pdf
filedata = pdfkit.from_string(html, False, options=options or {}, verbose=True)
html = '\n\n\n\n\n\nERPnext - Karin Cretney\n\n\n\n\t\t@media screen {\n\t.print-format-gutter {\n\t\tbackground-color: #d1d8dd;\n\t\tpadding: 30px 0px;\n\t}\n\t.print-format {\n\t\tbackground-color: white;\n\t\tborder-radius: 8px;\n\t\tmax-width: 8.3in;\n\t\tmin-height: 11.69in;\n\t\tpadding: 0.75in;\n\t\tmargin: auto;\n\t\tcolor: var(–gray-900);\n\t}\n\n\t.print-format.landscape {\n\t\tmax-width: 11.69in;\n\t\tpadding: 0.2in;\n\t}\n\n\t.page-break {\n\t\t/ padding: 15px 0px; /\n\t\tborder-bottom: 1px dashed #888;\n\t}\n\n\t/ .page-break:first-child {\n\t\tpadding-top: 0px;\n\t} /\n\n\t.page-break:last-child {\n\t\tb…
options = {‘print-media-type’: None, ‘background’: None, ‘images’: None, ‘encoding’: ‘UTF-8’, ‘margin-right’: ‘15mm’, ‘margin-left’: ‘15mm’, ‘margin-top’: ‘15mm’, ‘margin-bottom’: ‘15mm’, ‘page-size’: ‘A4’, ‘disable-javascript’: ‘’, ‘disable-local-file-access’: ‘’, ‘disable-smart-shrinking’: ‘’}
output = None
cover = {‘front’: [None], ‘back’: [None]}
cover_pages = <frappe.utils.pdf.CoverPages object at 0x7f2d802d9210>
filedata = ‘’
File “env/lib/python3.11/site-packages/pdfkit/api.py”, line 75, in from_string
return r.to_pdf(output_path)
input = '\n\n\n\n\n\nERPnext - Karin Cretney\n\n\n\n\t\t@media screen {\n\t.print-format-gutter {\n\t\tbackground-color: #d1d8dd;\n\t\tpadding: 30px 0px;\n\t}\n\t.print-format {\n\t\tbackground-color: white;\n\t\tborder-radius: 8px;\n\t\tmax-width: 8.3in;\n\t\tmin-height: 11.69in;\n\t\tpadding: 0.75in;\n\t\tmargin: auto;\n\t\tcolor: var(–gray-900);\n\t}\n\n\t.print-format.landscape {\n\t\tmax-width: 11.69in;\n\t\tpadding: 0.2in;\n\t}\n\n\t.page-break {\n\t\t/ padding: 15px 0px; /\n\t\tborder-bottom: 1px dashed #888;\n\t}\n\n\t/ .page-break:first-child {\n\t\tpadding-top: 0px;\n\t} /\n\n\t.page-break:last-child {\n\t\tb…
output_path = False
options = {‘print-media-type’: None, ‘background’: None, ‘images’: None, ‘encoding’: ‘UTF-8’, ‘margin-right’: ‘15mm’, ‘margin-left’: ‘15mm’, ‘margin-top’: ‘15mm’, ‘margin-bottom’: ‘15mm’, ‘page-size’: ‘A4’, ‘disable-javascript’: ‘’, ‘disable-local-file-access’: ‘’, ‘disable-smart-shrinking’: ‘’}
toc = None
cover = None
css = None
configuration = None
cover_first = False
verbose = True
r = <pdfkit.pdfkit.PDFKit object at 0x7f2d7a4bb990>
File “env/lib/python3.11/site-packages/pdfkit/pdfkit.py”, line 197, in to_pdf
stdout, stderr = result.communicate(input=input)
self = <pdfkit.pdfkit.PDFKit object at 0x7f2d7a4bb990>
path = False
args = [‘/usr/local/bin/wkhtmltopdf’, ‘–print-media-type’, ‘–background’, ‘–images’, ‘–encoding’, ‘UTF-8’, ‘–margin-right’, ‘15mm’, ‘–margin-left’, ‘15mm’, ‘–margin-top’, ‘15mm’, ‘–margin-bottom’, ‘15mm’, ‘–page-size’, ‘A4’, ‘–disable-javascript’, ‘–disable-local-file-access’, ‘–disable-smart-shrinking’, ‘-’, ‘-’]
result = <Popen: returncode: None args: [‘/usr/local/bin/wkhtmltopdf’, ‘–print-media…>
input = b’\n\n\n\n\n\nERPnext - Karin Cretney\n\n\n\n\t\t@media screen {\n\t.print-format-gutter {\n\t\tbackground-color: #d1d8dd;\n\t\tpadding: 30px 0px;\n\t}\n\t.print-format {\n\t\tbackground-color: white;\n\t\tborder-radius: 8px;\n\t\tmax-width: 8.3in;\n\t\tmin-height: 11.69in;\n\t\tpadding: 0.75in;\n\t\tmargin: auto;\n\t\tcolor: var(–gray-900);\n\t}\n\n\t.print-format.landscape {\n\t\tmax-width: 11.69in;\n\t\tpadding: 0.2in;\n\t}\n\n\t.page-break {\n\t\t/ padding: 15px 0px; /\n\t\tborder-bottom: 1px dashed #888;\n\t}\n\n\t/ .page-break:first-child {\n\t\tpadding-top: 0px;\n\t} /\n\n\t.page-break:last-child {\n\t\t…
File “/usr/lib/python3.11/subprocess.py”, line 1207, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
self = <Popen: returncode: None args: [‘/usr/local/bin/wkhtmltopdf’, ‘–print-media…>
input = b’\n\n\n\n\n\nERPnext - Karin Cretney\n\n\n\n\t\t@media screen {\n\t.print-format-gutter {\n\t\tbackground-color: #d1d8dd;\n\t\tpadding: 30px 0px;\n\t}\n\t.print-format {\n\t\tbackground-color: white;\n\t\tborder-radius: 8px;\n\t\tmax-width: 8.3in;\n\t\tmin-height: 11.69in;\n\t\tpadding: 0.75in;\n\t\tmargin: auto;\n\t\tcolor: var(–gray-900);\n\t}\n\n\t.print-format.landscape {\n\t\tmax-width: 11.69in;\n\t\tpadding: 0.2in;\n\t}\n\n\t.page-break {\n\t\t/ padding: 15px 0px; /\n\t\tborder-bottom: 1px dashed #888;\n\t}\n\n\t/ .page-break:first-child {\n\t\tpadding-top: 0px;\n\t} /\n\n\t.page-break:last-child {\n\t\t…
timeout = None
endtime = None
File “/usr/lib/python3.11/subprocess.py”, line 2059, in _communicate
ready = selector.select(timeout)
self = <Popen: returncode: None args: [‘/usr/local/bin/wkhtmltopdf’, ‘–print-media…>
input = b’\n\n\n\n\n\nERPnext - Karin Cretney\n\n\n\n\t\t@media screen {\n\t.print-format-gutter {\n\t\tbackground-color: #d1d8dd;\n\t\tpadding: 30px 0px;\n\t}\n\t.print-format {\n\t\tbackground-color: white;\n\t\tborder-radius: 8px;\n\t\tmax-width: 8.3in;\n\t\tmin-height: 11.69in;\n\t\tpadding: 0.75in;\n\t\tmargin: auto;\n\t\tcolor: var(–gray-900);\n\t}\n\n\t.print-format.landscape {\n\t\tmax-width: 11.69in;\n\t\tpadding: 0.2in;\n\t}\n\n\t.page-break {\n\t\t/ padding: 15px 0px; /\n\t\tborder-bottom: 1px dashed #888;\n\t}\n\n\t/ .page-break:first-child {\n\t\tpadding-top: 0px;\n\t} */\n\n\t.page-break:last-child {\n\t\t…
endtime = None
orig_timeout = None
stdout =
stderr =
input_view = <memory at 0x7f2d7a399d80>
selector = <selectors.PollSelector object at 0x7f2d7a2d5890>
timeout = None
ready = [(SelectorKey(fileobj=<_io.BufferedWriter name=14>, fd=14, events=2, data=None), 2)]
key = ********
events = 2
chunk = <memory at 0x7f2d7a399f00>
File “/usr/lib/python3.11/selectors.py”, line 415, in select
fd_event_list = self._selector.poll(timeout)
self = <selectors.PollSelector object at 0x7f2d7a2d5890>
timeout = None
ready =
File “env/lib/python3.11/site-packages/rq/timeouts.py”, line 63, in handle_death_penalty
raise self._exception(‘Task exceeded maximum timeout value ({0} seconds)’.format(self._timeout))
self = <rq.timeouts.UnixSignalDeathPenalty object at 0x7f2d81d93910>
signum = 14
frame = <frame at 0x7f2d7a47a340, file ‘/usr/lib/python3.11/selectors.py’, line 416, code select>
rq.timeouts.JobTimeoutException: Task exceeded maximum timeout value (300 seconds)