DocType Record not found

I just made bench update and I get this error:
Migrating ascl.com.sa Executing frappe.patches.v8_0.update_records_in_global_search in ascl.com.sa (37beee18b02eb1f2) 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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module> main() File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, 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 722, in __call__ return self.main(*args, **kwargs) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, 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 1066, 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 895, 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 535, 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 24, in _func ret = f(frappe._dict(ctx.obj), *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 210, in migrate migrate(context.verbose, rebuild_website=rebuild_website) File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 31, 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 83, in execute_patch frappe.get_attr(patchmodule.split()[0] + ".execute")() File "/home/frappe/frappe-bench/apps/frappe/frappe/patches/v8_0/update_records_in_global_search.py", line 5, in execute rebuild_for_doctype(doctype) File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/global_search.py", line 85, in rebuild_for_doctype all_children, child_search_fields = get_children_data(doctype, meta) File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/global_search.py", line 162, in get_children_data child_meta = frappe.get_meta(child.options) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 623, in get_meta return frappe.model.meta.get_meta(doctype, cached=cached) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 30, in get_meta return frappe.cache().hget("meta", doctype, lambda: Meta(doctype)) File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 171, in hget value = generator() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 30, in <lambda> return frappe.cache().hget("meta", doctype, lambda: Meta(doctype)) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 65, in __init__ super(Meta, self).__init__("DocType", doctype) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 84, in __init__ self.load_from_db() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 70, in load_from_db super(Meta, self).load_from_db() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 115, in load_from_db frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 316, in throw msgprint(msg, raise_exception=exc, title=title, indicator='red') File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 306, in msgprint _raise_exception() File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 279, in _raise_exception raise raise_exception, encode(msg) frappe.exceptions.DoesNotExistError: DocType Record not found

Hi, try something like this?

bench reload-doc Core DocType Record

This may interest you https://github.com/frappe/frappe/blame/develop/frappe/patches.txt

And this too Still more search fixes by pratu16x7 · Pull Request #3054 · frappe/frappe · GitHub

Thanks for your reply
but I get this :
/home/mohd/frappe-bench/apps/frappe/frappe/core/doctype/record/record.json missing

I am not convinced Record is an authentic DocType…

If that’s the case in your code too just delete it!

Delete it from where?

Try In the awesome searchbar ‘DocType List’

I am not able to do any thing !