DocType Process Payroll not Found DoesNotExistError V10

When upgrading from V9 to V10

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, 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/helio/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
main()
File “/home/helio/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/helio/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/helio/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/helio/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/helio/frappe-bench/apps/frappe/frappe/commands/site.py”, line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/helio/frappe-bench/apps/frappe/frappe/migrate.py”, line 35, in migrate
sync_fixtures()
File “/home/helio/frappe-bench/apps/frappe/frappe/utils/fixtures.py”, line 24, in sync_fixtures
ignore_links=True, overwrite=True)
File “/home/helio/frappe-bench/apps/frappe/frappe/core/doctype/data_import/data_import.py”, line 50, in import_doc
frappe.modules.import_file.import_file_by_path(f, data_import=True, force=True, pre_process=pre_process, reset_permissions=True)
File “/home/helio/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 58, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/helio/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 132, in import_doc
doc.insert()
File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 218, in insert
self.run_before_save_methods()
File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 859, in run_before_save_methods
self.run_method(“validate”)
File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 1024, in composer
return composed(self, method, *args, **kwargs)
File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 749, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/helio/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 28, in validate
meta = frappe.get_meta(self.dt, cached=False)
File “/home/helio/frappe-bench/apps/frappe/frappe/init.py”, line 655, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/helio/frappe-bench/apps/frappe/frappe/model/meta.py”, line 36, in get_meta
return load_meta(doctype)
File “/home/helio/frappe-bench/apps/frappe/frappe/model/meta.py”, line 39, in load_meta
return Meta(doctype)
File “/home/helio/frappe-bench/apps/frappe/frappe/model/meta.py”, line 72, in init
super(Meta, self).init(“DocType”, doctype)
File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 103, in init
self.load_from_db()
File “/home/helio/frappe-bench/apps/frappe/frappe/model/meta.py”, line 77, in load_from_db
super(Meta, self).load_from_db()
File “/home/helio/frappe-bench/apps/frappe/frappe/model/document.py”, line 140, in load_from_db
frappe.throw(
("{0} {1} not found").format(
(self.doctype), self.name), frappe.DoesNotExistError)
File “/home/helio/frappe-bench/apps/frappe/frappe/init.py”, line 323, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/helio/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
_raise_exception()
File “/home/helio/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
frappe.exceptions.DoesNotExistError: DocType Process Payroll not found

What should be the action to have it solved?

Here are clues for what to try https://discuss.erpnext.com/search?q=frappe.exceptions.DoesNotExistError%3A%20DocType%20not%20found

Thanks for the clues …but none of them is about V9 to V10 and most have no manual solutions but fixes pushed …

In which i believe this will be the case.

yes it seems to be missing -

frappe@erpnext:~/frappe-bench$ bench version
erpnext 9.2.13
frappe 9.2.14
frappe@erpnext:~/frappe-bench$ find . -name ‘process_payroll.py’
./apps/erpnext/erpnext/hr/doctype/process_payroll/process_payroll.py

frappe@erpnext:~/frappe-bench$ bench version
erpnext 10.0.4
frappe 10.0.5
frappe@erpnext:~/frappe-bench$ find . -name ‘process_payroll.py’
frappe@erpnext:~/frappe-bench$

the repo has changed there…just these two directories
https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/payroll_entry
https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/payroll_employee_detail

Thanks for the clues…
Will have to copy the directory with the information back to see if the system recreates this Doctype.i think this type of update shoulder be done smoothly when deleting doctypes to avoid loosing information and also manual fix for users.

ok yes process_entry replaces process_payroll

This patch does not migrate the contents of the old doctype to its replacement but simply deletes whatever contents are found there

https://github.com/frappe/erpnext/blob/develop/erpnext/patches/v9_2/delete_process_payroll.py