Ubuntu : 16.04.6 LTS
ERPNext: v11.1.42 (master)
Frappe Framework: v11.1.37 (…master)
Three days before I did a Fresh Install from master branch
=> bench get-app --branch master erpnext
And installed the app into my site.
=> bench --site [mysitename] install-app erpnext
After that I was able to successfully setup a company in ERPNEXT.
After viewing chart of accounts, I wanted a different suffix in Chart of accounts, so I thought of uninstalling the app, and then re-install again.
So I did uninstall :
=> bench --site [mysitename] uninstall-app erpnext
Everything went fine till before the Step removing Module Accounts…
In the Step removing Module Accounts, the following error was thrown
frappe.exceptions.LinkExistsError: Cannot delete or cancel because Module Def Accounts is linked with Notification Notification for new fiscal year
After installation, I created a company, and Logged-in viewed the Chart of Accounts, and immediately proceeded with the uninstall-app. I did not do any thing else inside ERPNEXT.
I want to add that, last week when I did the above steps, it worked perfectly.
So my hint is : some recent patches or fixes might be creating this problem.
Error Log :
```
============================
/home/sairam/.local/lib/python2.7/site-packages/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
All doctypes (including custom), modules related to this app will be deleted. Are you sure you want to continue (y/n) ? y
Backing up...
......................
........................
........................
removing DocType C-Form Invoice Detail...
removing DocType Cheque Print Template...
removing Report Asset Depreciation Ledger...
removing Report Asset Depreciations and Balances...
removing Report Unpaid Expense Claim...
removing Page bank-reconciliation...
removing Page pos...
removing Module Accounts...
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/sairam/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
File "/home/sairam/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/sairam/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/sairam/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/sairam/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/sairam/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/sairam/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/sairam/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/sairam/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/sairam/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/sairam/frappe-bench/apps/frappe/frappe/commands/site.py", line 338, in uninstall
remove_app(app, dry_run, yes)
File "/home/sairam/frappe-bench/apps/frappe/frappe/installer.py", line 219, in remove_app
frappe.delete_doc("Module Def", module_name)
File "/home/sairam/frappe-bench/apps/frappe/frappe/__init__.py", line 777, in delete_doc
ignore_permissions, flags, ignore_on_trash, ignore_missing)
File "/home/sairam/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 87, in delete_doc
check_if_doc_is_linked(doc)
File "/home/sairam/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 208, in check_if_doc_is_linked
raise_link_exists_exception(doc, linked_doctype, reference_docname)
File "/home/sairam/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 260, in raise_link_exists_exception
.format(doc.doctype, doc_link, reference_doctype, reference_link, row), frappe.LinkExistsError)
File "/home/sairam/frappe-bench/apps/frappe/frappe/__init__.py", line 360, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red')
File "/home/sairam/frappe-bench/apps/frappe/frappe/__init__.py", line 346, in msgprint
_raise_exception()
File "/home/sairam/frappe-bench/apps/frappe/frappe/__init__.py", line 315, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.LinkExistsError: Cannot delete or cancel because Module Def <a href="#Form/Module Def/Accounts">Accounts</a> is linked with Notification <a href="#Form/Notification/Notification for new fiscal year">Notification for new fiscal year</a>
```