Forms won't submit after upgrade to v7

hi everyone - strange issue that I’ve been trying to fix for days now. After upgrading to v7, I encountered some errors when migrating the database, which I was able to resolve as far as I know.

Everything seems to be working fine now, apart from submitting forms (i.e. invoices, quotations, etc)

If look at a saved quotation, and monitor the traffic after submitting, I a request is made that times out with a 504 error about 120 seconds later.

###On the POST, the JSON form-data looks normal, the action and cmd are as follows:

action:Submit
cmd:frappe.desk.form.save.savedocs

###web.err.rlog is showing:

[2016-09-09 11:54:39 +0000] [2704] [INFO] Starting gunicorn 19.6.0
[2016-09-09 11:54:39 +0000] [2704] [INFO] Listening at: http://127.0.0.1:8000 (2704)
[2016-09-09 11:54:39 +0000] [2704] [INFO] Using worker: sync
[2016-09-09 11:54:39 +0000] [2723] [INFO] Booting worker with pid: 2723
[2016-09-09 12:04:51 +0000] [2704] [CRITICAL] WORKER TIMEOUT (pid:2723)
[2016-09-09 12:04:51 +0000] [2723] [INFO] Worker exiting (pid: 2723)
[2016-09-09 12:04:51 +0000] [2911] [INFO] Booting worker with pid: 2911
[2016-09-09 12:09:53 +0000] [2704] [CRITICAL] WORKER TIMEOUT (pid:2911)
[2016-09-09 12:09:53 +0000] [2911] [INFO] Worker exiting (pid: 2911)
[2016-09-09 12:09:53 +0000] [2942] [INFO] Booting worker with pid: 2942

###node.socketio.log is showing:

{ Error: connect ETIMEDOUT 52.50.61.27:80
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)
code: ‘ETIMEDOUT’,
errno: ‘ETIMEDOUT’,
syscall: ‘connect’,
address: ‘52.50.61.27’,
port: 80,
response: undefined }
No response for doc_subscribe
No response for doc_subscribe

The socketio log is being written by root, not sure if that’s significant…

###output of supervisorctl status looks healthy:

frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 2742, uptime 0:24:09
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 2739, uptime 0:24:09
frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 2752, uptime 0:24:09
frappe-bench-web:frappe-bench-frappe-web RUNNING pid 2704, uptime 0:24:11
frappe-bench-web:frappe-bench-node-socketio RUNNING pid 2755, uptime 0:24:09
frappe-bench-workers:frappe-bench-frappe-default-worker-0 RUNNING pid 2721, uptime 0:24:10
frappe-bench-workers:frappe-bench-frappe-long-worker-0 RUNNING pid 2745, uptime 0:24:09
frappe-bench-workers:frappe-bench-frappe-schedule RUNNING pid 2674, uptime 0:24:13
frappe-bench-workers:frappe-bench-frappe-short-worker-0 RUNNING pid 2703, uptime 0:24:11

Any help would be greatly appreciated…

What error do you get on the screen when you hit Submit?

no error returned, the request just times out after 120sec with a 504 code.

###saving stdout to a log file shows the following:

14:07:13 web.1 | * Debugger is active!
14:07:13 web.1 | * Debugger pin code: 674-118-770
14:08:16 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:16] “GET / HTTP/1.1” 200 -
14:08:16 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:16] “GET /assets/frappe/css/bootstrap.css HTTP/1.1” 200 -
14:08:16 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:16] “GET /assets/css/frappe-web.css HTTP/1.1” 200 -
14:08:16 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:16] “GET /assets/erpnext/css/website.css HTTP/1.1” 200 -
14:08:16 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:16] “GET /assets/frappe/js/lib/jquery/jquery.min.js HTTP/1.1” 200 -
14:08:16 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:16] “GET /assets/js/frappe-web.min.js HTTP/1.1” 200 -
14:08:17 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:17] “GET /website_theme.css HTTP/1.1” 200 -
14:08:17 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:17] “GET /website_script.js HTTP/1.1” 200 -
14:08:17 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:17] “GET /assets/js/erpnext-web.min.js HTTP/1.1” 200 -
14:08:17 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:17] “GET /files/10256516_10205117519160837_8715334377201784639_n.jpg HTTP/1.1” 200 -
14:08:17 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:17] “GET /files/favicon.ico HTTP/1.1” 200 -
14:08:30 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:30] “POST / HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /desk HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/css/desk.min.css HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/css/list.min.css HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/css/form.min.css HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/css/report.min.css HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/css/module.min.css HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/css/erpnext.css HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/js/libs.min.js HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/js/desk.min.js HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/js/editor.min.js HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/js/list.min.js HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/js/report.min.js HTTP/1.1” 200 -
14:08:32 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:32] “GET /assets/js/form.min.js HTTP/1.1” 200 -
14:08:33 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:33] “GET /assets/erpnext/images/splash.png HTTP/1.1” 200 -
14:08:33 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:33] “GET /assets/js/d3.min.js HTTP/1.1” 200 -
14:08:33 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:33] “GET /assets/frappe/js/frappe/toolbar.js HTTP/1.1” 200 -
14:08:33 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:33] “GET /assets/js/erpnext.min.js HTTP/1.1” 200 -
14:08:33 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:33] “GET /assets/frappe/css/octicons/octicons.woff HTTP/1.1” 200 -
14:08:33 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:33] “GET /assets/erpnext/images/erp-icon.svg HTTP/1.1” 200 -
14:08:34 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:34] “GET /assets/frappe/sounds/email.mp3 HTTP/1.1” 200 -
14:08:34 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:34] “GET /assets/frappe/sounds/submit.mp3 HTTP/1.1” 200 -
14:08:34 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:34] “GET /assets/frappe/sounds/cancel.mp3 HTTP/1.1” 200 -
14:08:34 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:34] “GET /assets/frappe/sounds/delete.mp3 HTTP/1.1” 200 -
14:08:34 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:34] “GET /assets/frappe/sounds/click.mp3 HTTP/1.1” 200 -
14:08:34 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:34] “GET /assets/frappe/sounds/error.mp3 HTTP/1.1” 200 -
14:08:39 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:39] “POST / HTTP/1.1” 200 -
14:08:39 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:39] “GET /assets/frappe/css/font/fontawesome-webfont.woff?v=3.2.1 HTTP/1.1” 200 -
14:08:39 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:39] “POST / HTTP/1.1” 200 -
14:08:40 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:40] “GET /?doctype=Quotation&with_parent=1&cached_timestamp=&cmd=frappe.desk.form.load.getdoctype&=1473430112805 HTTP/1.1" 200 -
14:08:41 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:41] "GET /?stats=%5B%22_user_tags%22%2C%22status%22%5D&doctype=Quotation&cmd=frappe.desk.reportview.get_stats&
=1473430112806 HTTP/1.1” 200 -
14:08:41 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:41] “GET /?limit_start=0&limit_page_length=20&doctype=Quotation&fields=%5B%22%60tabQuotation%60.%60name%60%22%2C%22%60tabQuotation%60.%60owner%60%22%2C%22%60tabQuotation%60.%60docstatus%60%22%2C%22%60tabQuotation%60.%60_user_tags%60%22%2C%22%60tabQuotation%60.%60_comments%60%22%2C%22%60tabQuotation%60.%60modified%60%22%2C%22%60tabQuotation%60.%60modified_by%60%22%2C%22%60tabQuotation%60.%60_assign%60%22%2C%22%60tabQuotation%60.%60_liked_by%60%22%2C%22%60tabQuotation%60.%60_seen%60%22%2C%22%60tabQuotation%60.%60title%60%22%2C%22%60tabQuotation%60.%60customer%60%22%2C%22%60tabQuotation%60.%60valid_till%60%22%2C%22%60tabQuotation%60.%60base_grand_total%60%22%2C%22%60tabQuotation%60.%60company%60%22%2C%22%60tabQuotation%60.%60grand_total%60%22%2C%22%60tabQuotation%60.%60currency%60%22%2C%22%60tabQuotation%60.%60status%60%22%2C%22%60tabQuotation%60.customer_name%22%2C%22%60tabQuotation%60.base_grand_total%22%2C%22%60tabQuotation%60.status%22%2C%22%60tabQuotation%60.company%22%2C%22%60tabQuotation%60.currency%22%5D&filters=%5B%5B%22Quotation%22%2C%22docstatus%22%2C%22!%3D%22%2C%222%22%5D%5D&order_by=%60tabQuotation%60.%60modified%60+desc&with_comment_count=true&cmd=frappe.desk.reportview.get&=1473430112807 HTTP/1.1" 200 -
14:08:42 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:42] "GET /?doctype=Quotation&name=QTN-00212&cmd=frappe.desk.form.load.getdoc&
=1473430112808 HTTP/1.1” 200 -
14:08:42 web.1 | 84.131.253.186 - - [09/Sep/2016 14:08:42] “GET /?doctype=Quotation&name=QTN-00212&cmd=frappe.desk.notifications.get_open_count&_=1473430112809 HTTP/1.1” 200 -
14:09:04 web.1 | 84.131.253.186 - - [09/Sep/2016 14:09:04] “POST / HTTP/1.1” 200 -
14:10:04 web.1 | 84.131.253.186 - - [09/Sep/2016 14:10:04] “POST / HTTP/1.1” 200 -
14:10:41 socketio.1 | { Error: connect ETIMEDOUT 52.50.61.27:8000
14:10:41 socketio.1 | at Object.exports._errnoException (util.js:1026:11)
14:10:41 socketio.1 | at exports._exceptionWithHostPort (util.js:1049:20)
14:10:41 socketio.1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)
14:10:41 socketio.1 | code: ‘ETIMEDOUT’,
14:10:41 socketio.1 | errno: ‘ETIMEDOUT’,
14:10:41 socketio.1 | syscall: ‘connect’,
14:10:41 socketio.1 | address: ‘52.50.61.27’,
14:10:41 socketio.1 | port: 8000,
14:10:41 socketio.1 | response: undefined }
14:10:50 socketio.1 | No response for doc_subscribe
14:10:50 socketio.1 | No response for doc_subscribe

@episensor you probably have a locked table somewhere

check your mysql process list

Share the output of:

bench --site mysite mysql
show processlist

here’s the output, thanks!:

frappe@ip-172-31-34-144:~/frappe-bench$ bench --site site1.local mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 55
Server version: 10.1.17-MariaDB-1~trusty mariadb.org binary distribution

Copyright © 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [1bd3e0294da19198]> show processlist;
±—±-----------------±----------±-----------------±--------±-----±------±-----------------±---------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
±—±-----------------±----------±-----------------±--------±-----±------±-----------------±---------+
| 55 | 1bd3e0294da19198 | localhost | 1bd3e0294da19198 | Query | 0 | init | show processlist | 0.000 |
±—±-----------------±----------±-----------------±--------±-----±------±-----------------±---------+
1 row in set (0.00 sec)

MariaDB [1bd3e0294da19198]>

also after a long time an error was returned after submitting a form

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 683, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 672, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 242, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 286, in _save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 731, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 839, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 824, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 102, in trigger_email_alerts
evaluate_alert(doc, alert, eevent)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 155, in evaluate_alert
attachments = [frappe.attach_print(doc.doctype, doc.name)] if alert.attach_print else None)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1174, in attach_print
“fcontent”: get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True, doc=doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1157, in get_print
return get_pdf(html)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 16, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/frappe/frappe-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 -15. error:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 879, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 683, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 672, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 242, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 286, in _save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 731, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 839, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 824, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 102, in trigger_email_alerts
evaluate_alert(doc, alert, eevent)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 155, in evaluate_alert
attachments = [frappe.attach_print(doc.doctype, doc.name)] if alert.attach_print else None)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1174, in attach_print
“fcontent”: get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True, doc=doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1157, in get_print
return get_pdf(html)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 16, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/frappe/frappe-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 -15. error:

another update, ran sudo apt-get install wkhtmltopdf and now a different error is being thrown immediately when submitting a form

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 683, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 672, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 242, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 286, in _save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 731, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 839, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 824, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 102, in trigger_email_alerts
evaluate_alert(doc, alert, eevent)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 155, in evaluate_alert
attachments = [frappe.attach_print(doc.doctype, doc.name)] if alert.attach_print else None)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1174, in attach_print
“fcontent”: get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True, doc=doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1157, in get_print
return get_pdf(html)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 16, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/frappe/frappe-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.Unknown long argument --background

Name:
wkhtmltopdf 0.9.9

Synopsis:
wkhtmltopdf [OPTIONS]…
[More input files]

Description:
Converts one or more HTML pages into a PDF document, not using wkhtmltopdf
patched qt.

General Options:
–collate Collate when printing multiple copies
–copies Number of copies to print into the pdf file (default 1)
–extended-help Display more extensive help, detailing less common command switches
-h, --help Display help
-O, --orientation Set orientation to Landscape or Portrait
-s, --page-size Set paper size to: A4, Letter, etc.
–password HTTP Authentication password
-p, --proxy Use a proxy
-q, --quiet Be less verbose
–username HTTP Authentication username
-V, --version Output version information an exit
Reduced Functionality:
This version of wkhtmltopdf has been compiled against a version of QT without
the wkhtmltopdf patches. Therefore some features are missing, if you need
these features please use the static version.

Currently the list of features only supported with patch QT includes:

  • Printing more then one HTML document into a PDF file.
  • Running without an X11 server.
  • Adding a document outline to the PDF file.
  • Adding headers and footers to the PDF file.
  • Generating a table of contents.
  • Adding links in the generated PDF file.
  • Printing using the screen media-type.
  • Disabling the smart shrink feature of webkit.

Contact:
If you experience bugs or want to request new features please visit
, if you have any problems
or comments please feel free to contact me: see

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 879, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 683, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 672, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 242, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 286, in _save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 731, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 839, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 824, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 102, in trigger_email_alerts
evaluate_alert(doc, alert, eevent)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 155, in evaluate_alert
attachments = [frappe.attach_print(doc.doctype, doc.name)] if alert.attach_print else None)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1174, in attach_print
“fcontent”: get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True, doc=doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1157, in get_print
return get_pdf(html)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 16, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/frappe/frappe-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.Unknown long argument --background

Name:
wkhtmltopdf 0.9.9

Synopsis:
wkhtmltopdf [OPTIONS]…
[More input files]

Description:
Converts one or more HTML pages into a PDF document, not using wkhtmltopdf
patched qt.

General Options:
–collate Collate when printing multiple copies
–copies Number of copies to print into the pdf file (default 1)
–extended-help Display more extensive help, detailing less common command switches
-h, --help Display help
-O, --orientation Set orientation to Landscape or Portrait
-s, --page-size Set paper size to: A4, Letter, etc.
–password HTTP Authentication password
-p, --proxy Use a proxy
-q, --quiet Be less verbose
–username HTTP Authentication username
-V, --version Output version information an exit
Reduced Functionality:
This version of wkhtmltopdf has been compiled against a version of QT without
the wkhtmltopdf patches. Therefore some features are missing, if you need
these features please use the static version.

Currently the list of features only supported with patch QT includes:

  • Printing more then one HTML document into a PDF file.
  • Running without an X11 server.
  • Adding a document outline to the PDF file.
  • Adding headers and footers to the PDF file.
  • Generating a table of contents.
  • Adding links in the generated PDF file.
  • Printing using the screen media-type.
  • Disabling the smart shrink feature of webkit.

Contact:
If you experience bugs or want to request new features please visit
, if you have any problems
or comments please feel free to contact me: see

Seems like an issue with printformat generation via Email Alert

Try checking wkhtmltopdf forums for help