frappe / helpdesk

Modern, Streamlined, Free and Open Source Customer Service Software
https://frappe.io/helpdesk
GNU Affero General Public License v3.0
600 stars 248 forks source link

No module named 'frappe.core.doctype.hd_article_category' #1637

Closed safvanhuzain closed 2 months ago

safvanhuzain commented 11 months ago

@ssiyad Im getting this error When im trying to install Helpdesk

ERPNext: v14.2.1 (version-14)
Frappe Framework: v14.9.0 (version-14)

Installing helpdesk... Updating DocTypes for helpdesk : [========================================] 100% An error occurred while installing helpdesk: Module import failed for HD Article Category, the DocType you're trying to open might be deleted.
Error: No module named 'frappe.core.doctype.hd_article_category' Traceback (most recent call last): File "apps/frappe/frappe/modules/utils.py", line 240, in load_doctype_module doctype_python_modules[key] = frappe.get_module(module_name) File "apps/frappe/frappe/init.py", line 1323, in get_module return importlib.import_module(modulename) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'frappe.core.doctype.hd_article_category'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "apps/frappe/frappe/commands/site.py", line 413, in install_app _install_app(app, verbose=context.verbose, force=force) File "apps/frappe/frappe/installer.py", line 300, in install_app frappe.get_attr(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 1180, in get_doc doc = frappe.model.document.get_doc(*args, **kwargs) File "apps/frappe/frappe/model/document.py", line 72, in get_doc controller = get_controller(doctype) File "apps/frappe/frappe/model/base_document.py", line 81, in get_controller site_controllers[doctype] = _get_controller() File "apps/frappe/frappe/model/base_document.py", line 63, in _get_controller module = load_doctype_module(doctype, module_name) File "apps/frappe/frappe/modules/utils.py", line 244, in load_doctype_module raise ImportError(msg) from e ImportError: Module import failed for HD Article Category, the DocType you're trying to open might be deleted.
Error: No module named 'frappe.core.doctype.hd_article_category'

willEternal8 commented 9 months ago

Hi @sumitbhanushali, I'm facing same the issue, is there a solution to this error in latest release.

creamdory commented 8 months ago

I am also facing with the same issue with the following version: erpnext 15.17.1 frappe 15.17.3 helpdesk 0.10.0 hrms 16.0.0-dev payments 0.0.1

safvanhuzain commented 8 months ago

I am also facing with the same issue with the following version: erpnext 15.17.1 frappe 15.17.3 helpdesk 0.10.0 hrms 16.0.0-dev payments 0.0.1

Hi @creamdory , Can you try to uninstall and install again?

creamdory commented 8 months ago

Hi @safvanhuzain , yes I just did actually and pulled the latest just now, same issue.

creamdory commented 8 months ago

So the Helpdesk gets installed though. But having this error when trying to create tickets from the portal:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1716, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/helpdesk/helpdesk/helpdesk/doctype/hd_ticket_template/api.py", line 17, in get_one
    found, about = frappe.get_value(DOCTYPE_TEMPLATE, name, ["name", "about"])
TypeError: cannot unpack non-iterable NoneType object
safvanhuzain commented 8 months ago

So the Helpdesk gets installed though. But having this error when trying to create tickets from the portal:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1716, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/helpdesk/helpdesk/helpdesk/doctype/hd_ticket_template/api.py", line 17, in get_one
    found, about = frappe.get_value(DOCTYPE_TEMPLATE, name, ["name", "about"])
TypeError: cannot unpack non-iterable NoneType object

Did you get any issues while installing the helpdesk last time?

creamdory commented 8 months ago

Hi @safvanhuzain I can see in the build this:

Inter-DisplayRegular.woff2?v=3.19 referenced in /home/frappe/frappe-bench/apps/hrms/frontend/src/main.css didn't resolve at build time, it will remain unchanged to be resolved at runtime
RitvikSardana commented 2 months ago

Closing the issue due to inactivity, reopen if the issue still persists

abdo-host commented 1 month ago

I have the same issue

  File "apps/frappe/frappe/modules/utils.py", line 258, 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.\nError: 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.
Error: No module named 'frappe.core.doctype.hd_article_category'
abdo@abdo:~/frappe15$
bb-mcg commented 1 week ago

exactly same issue

  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']}
  File "apps/frappe/frappe/modules/utils.py", line 258, 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.\nError: No module named 'frappe.c
ore.doctype.hd_article_category'"
builtins.ImportError: Module import failed for HD Article Category, the DocType you're trying to open might be deleted.
Error: No module named 'frappe.core.doctype.hd_article_category'