When i try to install frappe CRM in my system I’m getting the below error stating that module not found CRM Lead Status
frappe-user@aalam:~/frappe-bench$ bench --site aalamerp.com install-app crm
Installing crm…
An error occurred while installing crm: Module import failed for CRM Lead Status , the DocType you’re trying to open might be deleted.
Error: No module named ‘frappe.core.doctype.crm_lead_status’
Traceback with variables (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 445, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {‘sites’: [‘aalamerp.com’], ‘force’: False, ‘verbose’: False, ‘p rofile’: False}
apps = (‘crm’,)
force = False
_install_app = <function install_app at 0x7d4ced663880>
filelock = <function filelock at 0x7d4ced663520>
exit_code = 0
site = ‘aalamerp.com’
app = ‘crm’
err = ImportError(“Module import failed for CRM Lead Status, the DocType y ou’re trying to open might be deleted.
Error: No module named ‘frappe.core.d octype.crm_lead_status’”)
File “apps/frappe/frappe/installer.py”, line 311, in install_app
frappe.get_attr(after_install)()
name = ‘crm’
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7d4cec2cc3a0>
sync_for = <function sync_for at 0x7d4cec2ccdc0>
sync_customizations = <function sync_customizations at 0x7d4ced7f1cf0>
sync_fixtures = <function sync_fixtures at 0x7d4cec2cd000>
app_hooks = {‘after_install’: [‘crm.install.after_install’], ‘app_descript ion’: [‘Kick-ass Open Source CRM’], ‘app_email’: [‘shariq@frappe.io’], ‘app_icon _route’: [‘/crm’], ‘app_icon_title’: [‘CRM’], ‘app_icon_url’: [‘’], ‘app_license ‘: [‘AGPLv3’], ‘app_name’: [‘crm’], ‘app_publisher’: [‘Frappe Technologies Pvt. Ltd.’], ‘app_title’: [‘Frappe CRM’], ‘before_install’: [‘crm.install.before_inst all’], ‘before_uninstall’: [‘crm.uninstall.before_uninstall’], ‘doc_events’: {‘C ontact’: {‘validate’: [‘crm.api.contact.validate’]}, ‘ToDo’: {‘after_insert’: [’ crm.api.todo.after_insert’]}, ‘Comment’: {‘on_update’: [‘crm.api.comment.on_upda te’]}, ‘WhatsApp Message’: {‘validate’: [‘crm.api.whatsapp.validate’], ‘on_updat e’: [‘crm.api.whatsapp.on_update’]}}, ‘override_doctype_class’: {‘Contact’: [‘cr m.overrides.contact.CustomContact’], ‘Email Template’: [‘crm.overrides.email_tem plate.CustomEmailTemplate’]}, ‘website_route_rules’: [{‘from_route’: ‘/crm/’, ‘to_route’: ‘crm’}]}
installed_apps = [‘frappe’, ‘erpnext’]
before_install = ‘crm.install.before_install’
out = None
after_install = ‘crm.install.after_install’
File “apps/crm/crm/install.py”, line 13, in after_install
add_default_lead_statuses()
File “apps/crm/crm/install.py”, line 52, in add_default_lead_statuses
doc = frappe.new_doc(“CRM Lead Status”)
statuses = {‘New’: {‘color’: ‘gray’, ‘position’: 1}, ‘Contacted’: {‘color’ : ‘orange’, ‘position’: 2}, ‘Nurture’: {‘color’: ‘blue’, ‘position’: 3}, ‘Qualif ied’: {‘color’: ‘green’, ‘position’: 4}, ‘Unqualified’: {‘color’: ‘red’, ‘positi on’: 5}, ‘Junk’: {‘color’: ‘purple’, ‘position’: 6}}
status = ‘New’
File “apps/frappe/frappe/init.py”, line 1190, in new_doc
new_doc = get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
doctype = ‘CRM Lead Status’
parent_doc = None
parentfield = None
as_dict = False
kwargs = {}
get_new_doc = <function get_new_doc at 0x7d4cea3eb010>
File “apps/frappe/frappe/model/create_new.py”, line 22, in get_new_doc
frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
doctype = ‘CRM Lead Status’
parent_doc = None
parentfield = None
as_dict = False
File “apps/frappe/frappe/model/create_new.py”, line 35, in make_new_doc
doc = frappe.get_doc({“doctype”: doctype, “__islocal”: 1, “owner”: frappe.se ssion.user, “docstatus”: 0})
doctype = ‘CRM Lead Status’
File “apps/frappe/frappe/init.py”, line 1333, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
args = ({‘doctype’: ‘CRM Lead Status’, ‘__islocal’: 1, ‘owner’: ‘Administr ator’, ‘docstatus’: 0},)
kwargs = {}
frappe = <module ‘frappe’ from ‘apps/frappe/frappe/init.py’>
File “apps/frappe/frappe/model/document.py”, line 83, in get_doc
controller = get_controller(doctype)
args = ({‘doctype’: ‘CRM Lead Status’, ‘__islocal’: 1, ‘owner’: ‘Administr ator’, ‘docstatus’: 0},)
kwargs = {‘doctype’: ‘CRM Lead Status’, ‘__islocal’: 1, ‘owner’: ‘Administ rator’, ‘docstatus’: 0}
doctype = ‘CRM Lead Status’
File “apps/frappe/frappe/model/base_document.py”, line 70, in get_controller
site_controllers[doctype] = import_controller(doctype)
doctype = ‘CRM Lead Status’
site_controllers = {‘Module Def’: <class ‘frappe.core.doctype.module_def.m odule_def.ModuleDef’>, ‘DocField’: <class ‘frappe.core.doctype.docfield.docfield .DocField’>, ‘DocPerm’: <class ‘frappe.core.doctype.docperm.docperm.DocPerm’>, ’ DocType Link’: <class 'frappe.core.doctype.doctype_link.doctype_link.DocTypeLink '>, ‘System Settings’: <class ‘frappe.core.doctype.system_settings.system_settin gs.SystemSettings’>, ‘Notification Settings’: <class ‘frappe.desk.doctype.notifi cation_settings.notification_settings.NotificationSettings’>, ‘DefaultValue’: <c lass ‘frappe.core.doctype.defaultvalue.defaultvalue.DefaultValue’>, ‘Payment Rec onciliation’: <class ‘erpnext.accounts.doctype.payment_reconciliation.payment_re conciliation.PaymentReconciliation’>, ‘Customize Form’: <class ‘frappe.custom.do ctype.customize_form.customize_form.CustomizeForm’>, ‘DocType Action’: <class ‘f rappe.core.doctype.doctype_action.doctype_action.DocTypeAction’>, ‘DocType State ‘: <class ‘frappe.core.doctype.doctype_state.doctype_state.DocTyp…
File “apps/frappe/frappe/model/base_document.py”, line 95, in import_controlle r
module = load_doctype_module(doctype, module_name)
doctype = ‘CRM Lead Status’
Document = <class ‘frappe.model.document.Document’>
NestedSet = <class ‘frappe.utils.nestedset.NestedSet’>
module_name = ‘Core’
doctype_info = None
module_path = None
class_overrides = {‘Address’: [‘erpnext.accounts.custom.address.ERPNextAdd ress’], ‘Contact’: [‘crm.overrides.contact.CustomContact’], ‘Email Template’: [’ crm.overrides.email_template.CustomEmailTemplate’]}
File “apps/frappe/frappe/modules/utils.py”, line 254, in load_doctype_module
raise ImportError(msg) from e
doctype = ‘CRM Lead Status’
module = ‘Core’
prefix = ‘’
suffix = ‘’
app = ‘frappe’
key = ********
module_name = ‘frappe.core.doctype.crm_lead_status.crm_lead_status’
msg = “Module import failed for CRM Lead Status, the DocType you’re trying to open might be deleted.
Error: No module named ‘frappe.core.doctype.crm_l ead_status’”
builtins.ImportError: Module import failed for CRM Lead Status, the DocType you’ re trying to open might be deleted.
Error: No module named ‘frappe.core.doct ype.crm_lead_status’