No module named 'frappe.core.doctype.hd_article_category' installing help desk

Getting Error No module named ‘frappe.core.doctype.hd_article_category’ while installing Help Desk

Installing helpdesk...
An error occurred while installing helpdesk: Module import failed for HD Article Category, the DocType you're trying to open might be deleted.<br> Error: No module named 'frappe.core.doctype.hd_article_category'
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': ['site_name'], 'force': False, 'verbose': False, 'profile': False}
      apps = ('helpdesk',)
      force = False
      _install_app = <function install_app at 0x7f7805a78ee0>
      filelock = <function filelock at 0x7f7805a78b80>
      exit_code = 0
      site = 'site_name'
      app = 'helpdesk'
      err = ImportError("Module import failed for HD Article Category, the DocType you're trying to open might be deleted.<br> Error: No module named 'frappe.core.doctype.hd_article_category'")
  File "apps/frappe/frappe/installer.py", line 311, in install_app
    frappe.get_attr(after_install)()
      name = 'helpdesk'
      verbose = False
      set_as_patched = True
      force = False
      sync_jobs = <function sync_jobs at 0x7f7804512c20>
      sync_for = <function sync_for at 0x7f7804513640>
      sync_customizations = <function sync_customizations at 0x7f7805bf7490>
      sync_fixtures = <function sync_fixtures at 0x7f7804513880>
      app_hooks = {'after_install': ['helpdesk.setup.install.after_install'], 'after_migrate': ['helpdesk.search.build_index_in_background'], 'app_color': ['grey'], 'app_description': ['Customer Service Software'], 'app_email': ['hello@frappe.io'], 'app_icon': ['octicon octicon-file-directory'], 'app_license': ['AGPLv3'], 'app_name': ['helpdesk'], 'app_publisher': ['Frappe Technologies'], 'app_title': ['Helpdesk'], 'before_install': ['helpdesk.setup.install.before_install'], 'doc_events': {'Contact': {'before_insert': ['helpdesk.helpdesk.hooks.contact.before_insert']}, 'Assignment Rule': {'on_trash': ['helpdesk.overrides.on_assignment_rule_trash']}}, 'has_permission': {'HD Ticket': ['helpdesk.helpdesk.doctype.hd_ticket.hd_ticket.has_permission']}, 'ignore_links_on_delete': ['HD Notification', 'HD Ticket Comment'], 'permission_query_conditions': {'HD Ticket': ['helpdesk.helpdesk.doctype.hd_ticket.hd_ticket.permission_query']}, 'scheduler_events': {'all': ['helpdesk.search.build_index_if_not_exists']}, 'w...
      installed_apps = ['frappe', 'erpnext', 'hrms', 'leadify', 'healthcare', 'financial_councelling', 'wn_customizations', 'claimify', 'lending', 'doctors_payouts', 'asset_management', 'builder', 'gameplan', 'drive']
      before_install = 'helpdesk.setup.install.before_install'
      out = None
      after_install = 'helpdesk.setup.install.after_install'
  File "apps/helpdesk/helpdesk/setup/install.py", line 18, in after_install
    add_default_categories_and_articles()
  File "apps/helpdesk/helpdesk/setup/install.py", line 53, in add_default_categories_and_articles
    category = frappe.get_doc(
  File "apps/frappe/frappe/__init__.py", line 1286, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
      args = ({'doctype': 'HD Article Category', 'category_name': 'Getting Started', 'description': 'Content for your Category'},)
      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': 'HD Article Category', 'category_name': 'Getting Started', 'description': 'Content for your Category'},)
      kwargs = {'doctype': 'HD Article Category', 'category_name': 'Getting Started', 'description': 'Content for your Category'}
      doctype = 'HD Article Category'
  File "apps/frappe/frappe/model/base_document.py", line 70, in get_controller
    site_controllers[doctype] = import_controller(doctype)
      doctype = 'HD Article Category'
      site_controllers = {'Website Settings': <class 'frappe.website.doctype.website_settings.website_settings.WebsiteSettings'>, 'DocField': <class 'frappe.core.doctype.docfield.docfield.DocField'>, 'DocPerm': <class 'frappe.core.doctype.docperm.docperm.DocPerm'>, 'DocType Action': <class 'frappe.core.doctype.doctype_action.doctype_action.DocTypeAction'>, 'Website Route Redirect': <class 'frappe.website.doctype.website_route_redirect.website_route_redirect.WebsiteRouteRedirect'>, 'Top Bar Item': <class 'frappe.website.doctype.top_bar_item.top_bar_item.TopBarItem'>, 'System Settings': <class 'frappe.core.doctype.system_settings.system_settings.SystemSettings'>, 'Notification Settings': <class 'frappe.desk.doctype.notification_settings.notification_settings.NotificationSettings'>, 'DocType Link': <class 'frappe.core.doctype.doctype_link.doctype_link.DocTypeLink'>, 'Module Def': <class 'frappe.core.doctype.module_def.module_def.ModuleDef'>, 'DefaultValue': <class 'frappe.core.doctype.defaultvalue.defaultvalue.De...
  File "apps/frappe/frappe/model/base_document.py", line 95, in import_controller
    module = load_doctype_module(doctype, module_name)
      doctype = 'HD Article Category'
      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.ERPNextAddress'], 'Employee': ['hrms.overrides.employee_master.EmployeeMaster'], 'Timesheet': ['hrms.overrides.employee_timesheet.EmployeeTimesheet'], 'Payment Entry': ['hrms.overrides.employee_payment_entry.EmployeePaymentEntry'], 'Project': ['hrms.overrides.employee_project.EmployeeProject'], 'Sales Invoice': ['healthcare.healthcare.custom_doctype.sales_invoice.HealthcareSalesInvoice']}
  File "apps/frappe/frappe/modules/utils.py", line 254, in load_doctype_module
    raise ImportError(msg) from e
      doctype = 'HD Article Category'
      module = 'Core'
      prefix = ''
      suffix = ''
      app = 'frappe'
      key = ********
      module_name = 'frappe.core.doctype.hd_article_category.hd_article_category'
      msg = "Module import failed for HD Article Category, the DocType you're trying to open might be deleted.<br> Error: No module named 'frappe.core.doctype.hd_article_category'"
builtins.ImportError: Module import failed for HD Article Category, the DocType you're trying to open might be deleted.<br> Error: No module named 'frappe.core.doctype.hd_article_category'

I am confused on why it is looking for hd_article_category doctype in frappe.core, it should look in help_desk

steps i followed

bench get-app helpdesk
bench --site site_name install-app helpdesk

what is the right way of installing an app from git?
should i migrate after bench get-app and then install app to the site?

remove and re-install

hey @rs115199789
removed and re-installed the app, got no error but there are no doctypes present in help desk
should we migrate after bench --site site_name install-app app_name

HD Article Category is a part of the helpdesk, not a frappe. if it is there, then remove the doctype from the frappe.

Missing DocTypes are ultimately looked up in the Core module of the frappe app, but it’s not present there. This is just a fallback.

Could you show us what are your avaiable apps using bench version -f table?

yes for me i tried migrate and build and then it was working.