I ran an update on one system today and did not realize that I’m on the development branch with this system. I also tried a rollback to v12 and the desk is just empty.
As far as I understand I am missing a doctype, does anyone know how to recreate these?
bench migrate raises following error:
[bench@sv01 erpnext]$ bench migrate
Migrating erpnext1.local
Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘doctype_link’, force=True) #2020-10-17 in erpnext1.local (6e593b8e9d037818)
Traceback (most recent call last):
File “/usr/lib64/python3.6/runpy.py”, line 193, in _run_module_as_main
“main”, mod_spec)
File “/usr/lib64/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 99, in
main()
File “/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/commands/init.py”, line 26, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/commands/site.py”, line 287, in migrate
skip_search_index=skip_search_index
File “/opt/bench/erpnext/apps/frappe/frappe/migrate.py”, line 67, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File “/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 41, in run_all
run_patch(patch)
File “/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 30, in run_patch
if not run_single(patchmodule = patch):
File “/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 71, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 92, in execute_patch
update_patch_log(patchmodule)
File “/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 110, in update_patch_log
frappe.get_doc({“doctype”: “Patch Log”, “patch”: patchmodule}).insert(ignore_permissions=True)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 233, in insert
self.set_new_name(set_name=set_name, set_child_names=set_child_names)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 423, in set_new_name
set_new_name(self)
File “/opt/bench/erpnext/apps/frappe/frappe/model/naming.py”, line 43, in set_new_name
set_naming_from_document_naming_rule(doc)
File “/opt/bench/erpnext/apps/frappe/frappe/model/naming.py”, line 98, in set_naming_from_document_naming_rule
dict(document_type=doc.doctype, disabled=0), order_by=‘priority desc’, ignore_ddl=True):
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 1370, in get_all
return get_list(doctype, *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 1343, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/db_query.py”, line 101, in execute
result = self.build_and_run()
File “/opt/bench/erpnext/apps/frappe/frappe/model/db_query.py”, line 118, in build_and_run
args = self.prepare_args()
File “/opt/bench/erpnext/apps/frappe/frappe/model/db_query.py”, line 146, in prepare_args
self.build_conditions()
File “/opt/bench/erpnext/apps/frappe/frappe/model/db_query.py”, line 367, in build_conditions
self.build_filter_conditions(self.filters, self.conditions)
File “/opt/bench/erpnext/apps/frappe/frappe/model/db_query.py”, line 388, in build_filter_conditions
conditions.append(self.prepare_filter_condition(f))
File “/opt/bench/erpnext/apps/frappe/frappe/model/db_query.py”, line 397, in prepare_filter_condition
f = get_filter(self.doctype, f, additional_filters_config)
File “/opt/bench/erpnext/apps/frappe/frappe/utils/data.py”, line 1154, in get_filter
meta = frappe.get_meta(f.doctype)
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 814, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/opt/bench/erpnext/apps/frappe/frappe/model/meta.py”, line 37, in get_meta
meta = Meta(doctype)
File “/opt/bench/erpnext/apps/frappe/frappe/model/meta.py”, line 83, in init
super(Meta, self).init(“DocType”, doctype)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 113, in init
self.load_from_db()
File “/opt/bench/erpnext/apps/frappe/frappe/model/meta.py”, line 88, in load_from_db
super(Meta, self).load_from_db()
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 156, in load_from_db
frappe.throw((“{0} {1} not found”).format((self.doctype), self.name), frappe.DoesNotExistError)
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 408, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 387, in msgprint
_raise_exception()
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 341, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: DocType Document Naming Rule not found