ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Error while cancelling a document

I have 2 sites and after update to version 13 both are behaving differently.

In one site, when we try to cancel Journal Entry we are getting following error
DocType Bank Reconciliation not found
The resource you are looking for is not available

The stack trace is

POST api/method/frappe.desk.form.linked_with.get_submitted_linked_docs 404 (NOT FOUND)

send @ jquery.min.js:4
ajax @ jquery.min.js:4
frappe.request.call @ request.js:229
frappe.call @ request.js:98
savecancel @ form.js:679
(anonymous) @ toolbar.js:482
(anonymous) @ page.js:254
dispatch @ jquery.min.js:3
r.handle @ jquery.min.js:3

In the other site
When we try to cancel a Material Request we get the following error
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/erp_healthcare/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_planning_tool’
Stack Trace
Traceback (most recent call last):
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/app.py”, line 68, in application
response = frappe.api.handle()
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/handler.py”, line 31, in handle
data = execute_cmd(cmd)
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/handler.py”, line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/init.py”, line 1177, in call
return fn(*args, **newargs)
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/desk/form/linked_with.py”, line 43, in get_submitted_linked_docs
linked_docs = get_linked_docs(doctype, name, linkinfo)
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/desk/form/linked_with.py”, line 168, in get_linked_docs
link_meta_bundle = frappe.desk.form.load.get_meta_bundle(dt)
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/desk/form/load.py”, line 80, in get_meta_bundle
bundle = [frappe.desk.form.meta.get_meta(doctype)]
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 29, in get_meta
meta = FormMeta(doctype)
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 39, in init
self.load_assets()
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 49, in load_assets
self.add_code()
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 107, in add_code
self.add_html_templates(path)
File “/home/erp_healthcare/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 120, in add_html_templates
for fname in os.listdir(path):
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/erp_healthcare/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_planning_tool’

How do I resolve these issues? Kindly guide.

regards,

Amit