Can't submit salary slip ,whats is the process of generating salary slip please help

Dear sir,
when i submit salary slip

when i click submit button

Traceback (most recent call last):
File “/home/umoms/moms-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 848, in submit
self._submit()
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 837, in _submit
self.save()
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 313, in _save
self.run_post_save_methods()
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 908, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/umoms/moms-bench/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py”, line 500, in on_submit
self.email_salary_slip()
File “/home/umoms/moms-bench/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py”, line 526, in email_salary_slip
“attachments”: [frappe.attach_print(self.doctype, self.name, file_name=self.name)],
File “/home/umoms/moms-bench/apps/frappe/frappe/init.py”, line 1376, in attach_print
“fcontent”: get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True, doc=doc, no_letterhead=no_letterhead)
File “/home/umoms/moms-bench/apps/frappe/frappe/init.py”, line 1353, in get_print
return get_pdf(html, output = output)
File “/home/umoms/moms-bench/apps/frappe/frappe/utils/pdf.py”, line 23, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/umoms/moms-bench/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/umoms/moms-bench/env/src/pdfkit/pdfkit/pdfkit.py”, line 143, in to_pdf
raise IOError(“wkhtmltopdf exited with non-zero code {0}. error:\n{1}”.format(exit_code, stderr.decode(“utf-8”)))
IOError: wkhtmltopdf exited with non-zero code 1. error:
The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.The switch --print-media-type, is not support using unpatched qt, and will be ignored.QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-umoms’
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.

Traceback (most recent call last):
File “/home/umoms/moms-bench/apps/frappe/frappe/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/umoms/moms-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/umoms/moms-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/umoms/moms-bench/apps/frappe/frappe/init.py”, line 1026, in call
return fn(*args, **newargs)
File “/home/umoms/moms-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 848, in submit
self._submit()
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 837, in _submit
self.save()
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 313, in _save
self.run_post_save_methods()
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 908, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/umoms/moms-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/umoms/moms-bench/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py”, line 500, in on_submit
self.email_salary_slip()
File “/home/umoms/moms-bench/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py”, line 526, in email_salary_slip
“attachments”: [frappe.attach_print(self.doctype, self.name, file_name=self.name)],
File “/home/umoms/moms-bench/apps/frappe/frappe/init.py”, line 1376, in attach_print
“fcontent”: get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True, doc=doc, no_letterhead=no_letterhead)
File “/home/umoms/moms-bench/apps/frappe/frappe/init.py”, line 1353, in get_print
return get_pdf(html, output = output)
File “/home/umoms/moms-bench/apps/frappe/frappe/utils/pdf.py”, line 23, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/umoms/moms-bench/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/umoms/moms-bench/env/src/pdfkit/pdfkit/pdfkit.py”, line 143, in to_pdf
raise IOError(“wkhtmltopdf exited with non-zero code {0}. error:\n{1}”.format(exit_code, stderr.decode(“utf-8”)))
IOError: wkhtmltopdf exited with non-zero code 1. error:
The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.The switch --print-media-type, is not support using unpatched qt, and will be ignored.QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-umoms’
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.

Please Help me

try to check on the following things

How is the salary structure? is it correctly setup?
is the letterhead available?
how are permissions? are permissions allowing you to submit?
lastly, go to HR Settings, and disable email of salary slip, try to submit salary slip with email disabled.

Thanks for pointing out those setting and disable email of salary slip in HR Settings
its working sir thank you…

1 Like

Okay. But still that is a problem. Because salary slip should work together with email enabled.
so that can be as a temporary solution while you are still looking for the permanent one