ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Cannot upgrade from v10 to v11


#1

Got this error while updating

Executing execute:frappe.delete_doc(‘Page’, ‘applications’, ignore_missing=True) in site1.local (276bcef1b819c937)
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/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/frappe/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/frappe/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/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/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/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 227, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 38, in migrate
frappe.modules.patch_handler.run_all()
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 81, in execute_patch
exec(patchmodule.split(“execute:”)[1],globals())
File “”, line 1, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 764, in delete_doc
ignore_permissions, flags, ignore_on_trash, ignore_missing)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/delete_doc.py”, line 87, in delete_doc
check_if_doc_is_linked(doc)
File “/home/frappe/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/frappe/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/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 351, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 337, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 310, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.LinkExistsError: Cannot delete or cancel because Page applications is linked with Custom Role 418d45542d


#2

Hi anyone know why this error occurs


#3

The error says the update was trying to delete some document but it failed as it is linked to custom role.

Hope someone from the Frappe team can look into this.


#4

Yes, I deleted those lines in patches.txt and upgraded.

Hope upgrade not completed successfully.


#5

How to remove the custom role. Only issue with two sites in same server.