Try ERPNext Buy Support Partners Foundation

Bench update fails for custom app with frappe.exceptions.MandatoryError: <b>HTML</b> is required

Updating to latest Frappe and ERPnext on version-12.

Getting below error while bench update.

cust1 passes, but after cust 2 (last app) it gives below error.

Patching sites…
Migrating mysite.aakvatech.com
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Updating DocTypes for cust1 : [========================================]
Updating DocTypes for cust2 : [========================================]
Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/myfrappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/myfrappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/myfrappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/myfrappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/myfrappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/myfrappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/myfrappe/frappe-bench/env/lib/python3.5/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, kwargs)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 233, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 52, in migrate
sync_fixtures()
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/utils/fixtures.py”, line 24, in sync_fixtures
ignore_links=True, overwrite=True)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/data_import.py”, line 56, in import_doc
frappe.modules.import_file.import_file_by_path(f, data_import=True, force=True, pre_process=pre_process, reset_permissions=True)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 66, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 141, in import_doc
doc.insert()
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 228, in insert
self.run_before_save_methods()
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 886, in run_before_save_methods
self.run_method(“validate”)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 786, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1056, in composer
return composed(self, method, *args, **kwargs)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1039, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 780, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/printing/doctype/print_format/print_format.py”, line 38, in validate
frappe.throw(
(’{0} is required’).format(frappe.bold(
(‘HTML’))), frappe.MandatoryError)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/init.py”, line 360, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/init.py”, line 346, in msgprint
_raise_exception()
File “/home/myfrappe/frappe-bench/apps/frappe/frappe/init.py”, line 315, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.MandatoryError: HTML is required

It was a problem in one of the print formats whereby the Custom Format was checked but there was missing HTML code.

Removed the print format from fixtures and bench update was successful.