Server Error: Please check your server logs or contact tech support.get_descendants_of

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 61, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 56, in execute_cmd
return, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 1019, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 71, in getdoctype
docs = get_meta_bundle(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 81, in get_meta_bundle
bundle = [frappe.desk.form.meta.get_meta(doctype)]
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 26, in get_meta
meta = FormMeta(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 39, in init
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 53, in load_assets
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 174, in load_templates
module = load_doctype_module(
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/”, line 187, in load_doctype_module
raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
ImportError: Module import failed for Expense Claim ( Error: cannot import name get_descendants_of)

Which version (erppnext/frappe) are you using?

“erpnext”: “11.1.21”,
“frappe”: “11.1.3”

Can you check if you have the file ./apps/erpnext/erpnext/hr/doctype/expense_claim/ Can you do

$ bench update


bench updated

you need to switch branch… erpnext v11.1.67 and frappe version-11.1.16
or switch all branch to the stable version

I’ve tried to fix it from code level, is it a coding problem or configuration problem?

Simply incompatible versions; please bring your code to a working version, as proposed by @Johnrech_Cabatana

Note this post too What is "get_descendants_of"? How can i solve this?

just switch it to the latest version of v11…
bench switch-branch version-11 username