Error While Installing New app

frappe@erpnext:~/frappe-bench$ bench install-app doctype_customization

Installing doctype_customization…
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 94, 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 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 160, in install_app
_install_app(app, verbose=context.verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 145, in install_app
add_to_installed_apps(name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 166, in add_to_installed_apps
post_install(rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 230, in post_install
init_singles()
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 248, in init_singles
doc = frappe.new_doc(single)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 598, in new_doc
return get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py”, line 20, in get_new_doc
frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py”, line 38, in make_new_doc
“docstatus”: 0
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 622, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 49, in get_doc
controller = get_controller(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 35, in get_controller
module = load_doctype_module(doctype, module_name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 175, in load_doctype_module
app = get_module_app(module)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 198, in get_module_app
return frappe.local.module_app[scrub(module)]
KeyError: u’healthcare’

Hi,

Remove the healthcare app entry from /home/frappe/sites/apps.txt as well.
Then try again with installation.

Thanks
Navdeep

Hi there were no app like healthcare in apps.txt

Okay!, It’s not app now, It’s a module now inside erpnext app.

Can you share the content of file home/frappe/frappe-bench/apps/erpnext/erpnext/modules.txt with me?

Apps.txt contents.

Accounts
CRM
Buying
Projects
Selling
Setup
HR
Manufacturing
Stock
Support
Utilities
Shopping Cart
Hub Node
Portal
Maintenance
Schools
Regional

Add one more entry in this file at the bottom
Healthcare

and also ensure that there must be one folder with name of healthcare in erpnext app.
If it’s not there then you’ve missed something while installation.

Thanks. It resolved. but ERPNext core team have to add Healthcare in modules.txt otherwsie when we pull updates then changes will be overriden.