Bench Update throwing errors

Hello,

I had installed a custom app on the server but had later removed it from the apps by using

bench remove-app custom app
and
bench remove-from-installed-apps custom app

I had also deleted the app from the tabModule Def inside the database. But, whenever I am running a bench update or Bench migrate, I am getting this following error:

Migrating preqp
Executing frappe.patches.v7_2.set_in_standard_filter_property #1 in preqp (bd1043fd48)
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/proman/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/proman/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/proman/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/home/proman/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/home/proman/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/proman/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/proman/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/proman/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/proman/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/proman/frappe-bench/apps/frappe/frappe/commands/site.py”, line 209, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/proman/frappe-bench/apps/frappe/frappe/migrate.py”, line 30, in migrate
frappe.modules.patch_handler.run_all()
File “/home/proman/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/proman/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/proman/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/proman/frappe-bench/apps/frappe/frappe/patches/v7_2/set_in_standard_filter_property.py”, line 12, in execute
frappe.reload_doctype(doctype.name, force=True)
File “/home/proman/frappe-bench/apps/frappe/frappe/init.py”, line 644, in reload_doctype
force=force, reset_permissions=reset_permissions)
File “/home/proman/frappe-bench/apps/frappe/frappe/init.py”, line 656, in reload_doc
return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/proman/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 141, in reload_doc
return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/proman/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 19, in import_files
reset_permissions=reset_permissions)
File “/home/proman/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 23, in import_file
path = get_file_path(module, dt, dn)
File “/home/proman/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 30, in get_file_path
path = os.path.join(get_module_path(module),
File “/home/proman/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 133, in get_module_path
return frappe.get_module_path(module)
File “/home/proman/frappe-bench/apps/frappe/frappe/init.py”, line 681, in get_module_path
return get_pymodule_path(local.module_app[module] + “.” + module, *joins)
KeyError: u’epochapp’

Please help

Regards
Uma

I believe this should fix it [enhance] custom perms, frappe/erpnext#6093 by rmehta · Pull Request #2577 · frappe/frappe · GitHub

Thanks Rushabh. So, should I try running bench update again?

Thanks
Uma

I don’t think this is merged yet, you can manually update the file and migrate!

Thanks for responding so promptly Rushabh. But, I am still not clear with the github and pull things yet. So, can you please let me know which file and which lines? The link is showing many files.

Thanks a ton
Uma

Ok pushed the fix, you can now do bench update

Thanks a ton Rushabh. Will try it out and let you know… :slight_smile:

Thanks Rushabh… The bench update went off well… :slight_smile: