Error while deleting Chart Of Account

Hello,
I am facing error while deleting any Chart Of Account.
Please Advise.

What kind of error ? Can you provide a little more detail

Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/client.py”, line 215, in delete
frappe.delete_doc(doctype, name, ignore_missing=False)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 673, in delete_doc
ignore_permissions, flags, ignore_on_trash, ignore_missing)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/delete_doc.py”, line 78, in delete_doc
doc.run_method(“on_trash”)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 1024, in composer
return composed(self, method, *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 749, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/account.py”, line 166, in on_trash
super(Account, self).on_trash(True)
TypeError: on_trash() takes exactly 1 argument (2 given)

This is what i get when i delete chart of account

What version are you on ? If you are using develop branch, then are you all up to date ? This shouldn’t be an issue.

Version Details :
v

Kindly Advise.

Check your nestedset.py file and see if it looks like this


Or simply do a git pull for frappe because the deleting COA change was linked to minor change in frappe framework.

sorry i am new in erpnext please explain in details. i didn’t get your point.

Just run bench update command from the terminal. That should fetch all the changes.

which command?

bench update
I hope you haven’t done any customization locally