ModuleNotFoundError: No module named 'hrms'

Follow everyone’s instructions. I removed the ID column from the csv file. However I don’t think that’s the problem. After I pressed start still nothing happened. I proceed to check the error list. This is an error.

Traceback with variables (most recent call last):
  File "apps/frappe/frappe/core/doctype/data_import/data_import.py", line 142, in start_import
    i.import_data()
      data_import = <DataImport: Employee Import on 2024-07-02 13:59:05.238174>
      i = <frappe.core.doctype.data_import.importer.Importer object at 0x74316e39e2d0>
  File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 78, in import_data
    payloads = self.import_file.get_payloads_for_import()
      self = <frappe.core.doctype.data_import.importer.Importer object at 0x74316e39e2d0>
  File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 519, in get_payloads_for_import
    doc, rows, data = self.parse_next_row_for_import(data)
      self = <frappe.core.doctype.data_import.importer.ImportFile object at 0x74316d9632d0>
      payloads = []
      data = [<frappe.core.doctype.data_import.importer.Row object at 0x74316ee5dc10>]
  File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 555, in parse_next_row_for_import
    parent_doc = row.parse_doc(doctype)
      self = <frappe.core.doctype.data_import.importer.ImportFile object at 0x74316d9632d0>
      data = [<frappe.core.doctype.data_import.importer.Row object at 0x74316ee5dc10>]
      doctypes = [('Employee', None)]
      first_row = <frappe.core.doctype.data_import.importer.Row object at 0x74316ee5dc10>
      rows = [<frappe.core.doctype.data_import.importer.Row object at 0x74316ee5dc10>]
      row = <frappe.core.doctype.data_import.importer.Row object at 0x74316ee5dc10>
      parent_doc = None
      doctype = 'Employee'
      table_df = None
  File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 652, in parse_doc
    return self._parse_doc(doctype, columns, values, parent_doc, table_df)
      self = <frappe.core.doctype.data_import.importer.Row object at 0x74316ee5dc10>
      doctype = 'Employee'
      parent_doc = None
      table_df = None
      col_indexes = [0, 1, 2, 3, 4, 5]
      values = ['VNC.Conference (Demo)', '7/2/2024', '7/2/2024', 'join sonein', 'Nam', 'Suspended']
      columns = [<frappe.core.doctype.data_import.importer.Column object at 0x74316d981bd0>, <frappe.core.doctype.data_import.importer.Column object at 0x74316ee5d010>, <frappe.core.doctype.data_import.importer.Column object at 0x74316e3a55d0>, <frappe.core.doctype.data_import.importer.Column object at 0x74316d7e2950>, <frappe.core.doctype.data_import.importer.Column object at 0x74316d825210>, <frappe.core.doctype.data_import.importer.Column object at 0x74316d6edcd0>]
  File "apps/frappe/frappe/core/doctype/data_import/importer.py", line 658, in _parse_doc
    doc = frappe.new_doc(
      self = <frappe.core.doctype.data_import.importer.Row object at 0x74316ee5dc10>
      doctype = 'Employee'
      columns = [<frappe.core.doctype.data_import.importer.Column object at 0x74316d981bd0>, <frappe.core.doctype.data_import.importer.Column object at 0x74316ee5d010>, <frappe.core.doctype.data_import.importer.Column object at 0x74316e3a55d0>, <frappe.core.doctype.data_import.importer.Column object at 0x74316d7e2950>, <frappe.core.doctype.data_import.importer.Column object at 0x74316d825210>, <frappe.core.doctype.data_import.importer.Column object at 0x74316d6edcd0>]
      values = ['VNC.Conference (Demo)', '7/2/2024', '7/2/2024', 'join sonein', 'Nam', 'Suspended']
      parent_doc = None
      table_df = None
      doc = {}
  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 = 'Employee'
      parent_doc = None
      parentfield = None
      as_dict = True
      kwargs = {}
      get_new_doc = <function get_new_doc at 0x74316d16b9c0>
  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 = 'Employee'
      parent_doc = None
      parentfield = None
      as_dict = True
  File "apps/frappe/frappe/model/create_new.py", line 35, in make_new_doc
    doc = frappe.get_doc({"doctype": doctype, "__islocal": 1, "owner": frappe.session.user, "docstatus": 0})
      doctype = 'Employee'
  File "apps/frappe/frappe/__init__.py", line 1333, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
      args = ({'doctype': 'Employee', '__islocal': 1, 'owner': 'Administrator', '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': 'Employee', '__islocal': 1, 'owner': 'Administrator', 'docstatus': 0},)
      kwargs = {'doctype': 'Employee', '__islocal': 1, 'owner': 'Administrator', 'docstatus': 0}
      doctype = 'Employee'
  File "apps/frappe/frappe/model/base_document.py", line 70, in get_controller
    site_controllers[doctype] = import_controller(doctype)
      doctype = 'Employee'
      site_controllers = {'Data Import': <class 'frappe.core.doctype.data_import.data_import.DataImport'>, 'File': <class 'frappe.core.doctype.file.file.File'>}
  File "apps/frappe/frappe/model/base_document.py", line 92, in import_controller
    module = frappe.get_module(module_path)
      doctype = 'Employee'
      Document = <class 'frappe.model.document.Document'>
      NestedSet = <class 'frappe.utils.nestedset.NestedSet'>
      module_name = 'Setup'
      doctype_info = {'name': 'Employee', 'creation': datetime.datetime(2022, 2, 21, 11, 54, 9, 632218), 'modified': datetime.datetime(2024, 1, 3, 17, 36, 20, 984421), 'modified_by': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'idx': 24, 'search_fields': 'employee_name', 'issingle': 0, 'is_virtual': 0, 'is_tree': 1, 'istable': 0, 'editable_grid': 1, 'track_changes': 0, 'module': 'Setup', 'restrict_to_domain': None, 'app': None, 'autoname': 'naming_series:', 'naming_rule': 'By "Naming Series" field', 'title_field': 'employee_name', 'image_field': 'image', 'timeline_field': None, 'sort_field': 'modified', 'sort_order': 'DESC', 'description': None, 'colour': None, 'read_only': 0, 'in_create': 0, 'menu_index': None, 'parent_node': None, 'smallicon': None, 'allow_copy': 0, 'allow_rename': 1, 'allow_import': 1, 'hide_toolbar': 0, 'track_seen': 0, 'max_attachments': 0, 'print_outline': None, 'document_type': 'Setup', 'icon': 'fa fa-user', 'color': None, 'tag_fields': None, 'subject': None, '_last_u...
      module_path = 'hrms.overrides.employee_master'
      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']}
      import_path = 'hrms.overrides.employee_master.EmployeeMaster'
      classname = 'EmployeeMaster'
  File "apps/frappe/frappe/__init__.py", line 1476, in get_module
    return importlib.import_module(modulename)
      modulename = 'hrms.overrides.employee_master'
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
      name = 'hrms.overrides.employee_master'
      package = None
      level = 0
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
      name = 'hrms.overrides.employee_master'
      package = None
      level = 0
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
      name = 'hrms.overrides.employee_master'
      import_ = <function _gcd_import at 0x7431721cfd80>
      module = <exception while printing> Traceback (most recent call last):
          File "env/lib/python3.11/site-packages/traceback_with_variables/core.py", line 222, in _to_cropped_str
            raw = print_(obj)
                  ^^^^^^^^^^^
          File "apps/frappe/frappe/utils/__init__.py", line 328, in dict_printer
            if key in v:
               ^^^^^^^^
        TypeError: argument of type 'object' is not iterable
        
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
      name = 'hrms.overrides.employee_master'
      import_ = <function _gcd_import at 0x7431721cfd80>
      path = None
      parent = 'hrms.overrides'
      parent_spec = None
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      f = <function _gcd_import at 0x7431721cfd80>
      args = ('hrms.overrides',)
      kwds = {}
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
      name = 'hrms.overrides'
      package = None
      level = 0
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
      name = 'hrms.overrides'
      import_ = <function _gcd_import at 0x7431721cfd80>
      module = <exception while printing> Traceback (most recent call last):
          File "env/lib/python3.11/site-packages/traceback_with_variables/core.py", line 222, in _to_cropped_str
            raw = print_(obj)
                  ^^^^^^^^^^^
          File "apps/frappe/frappe/utils/__init__.py", line 328, in dict_printer
            if key in v:
               ^^^^^^^^
        TypeError: argument of type 'object' is not iterable
        
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
      name = 'hrms.overrides'
      import_ = <function _gcd_import at 0x7431721cfd80>
      path = None
      parent = 'hrms'
      parent_spec = None
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      f = <function _gcd_import at 0x7431721cfd80>
      args = ('hrms',)
      kwds = {}
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
      name = 'hrms'
      package = None
      level = 0
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
      name = 'hrms'
      import_ = <function _gcd_import at 0x7431721cfd80>
      module = <exception while printing> Traceback (most recent call last):
          File "env/lib/python3.11/site-packages/traceback_with_variables/core.py", line 222, in _to_cropped_str
            raw = print_(obj)
                  ^^^^^^^^^^^
          File "apps/frappe/frappe/utils/__init__.py", line 328, in dict_printer
            if key in v:
               ^^^^^^^^
        TypeError: argument of type 'object' is not iterable
        
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
      name = 'hrms'
      import_ = <function _gcd_import at 0x7431721cfd80>
      path = None
      parent = ''
      parent_spec = None
      spec = None
builtins.ModuleNotFoundError: No module named 'hrms'

As your error says - no module found.

  • Module Missing: The hrms module might not be installed or properly configured in your environment.
  • Incorrect Path: The path specified for the module might be incorrect or incomplete.
  • Virtual Environment: The module might not be installed in the virtual environment you’re currently using.

I suggest you to uninstall your current HRMS and re-install it.

You’re right. I thought about this problem because I installed hrms and I saw HR on the website. But the problem is that I install it on docker and run it on a virtual machine. So I don’t know how to fix it exactly, or how to install hrms into the docker environment. I think this is the problem. I tested and this is the result I got.:

frappe@53dcaf270459:~/frappe-bench$ ls apps
erpnext  frappe  hrms

frappe@53dcaf270459:~/frappe-bench$ bench list-apps

frappe  15.29.2 UNVERSIONED
erpnext 15.27.6 UNVERSIONED


frappe@53dcaf270459:~/frappe-bench$ bench --site frontend list-apps

frappe  15.29.2 UNVERSIONED
erpnext 15.27.6 UNVERSIONED

yes because i faced the same issue earlier, Here is the link to install hrms- https://www.youtube.com/watch?v=K3rwp-3UM_E

According to your advice, I will start by removing hrms from the current site. then delete hrms in apps and finally reinstall as video.

yes please

once try with bench clear-cache

I have tried it before. However, it has no effect on the current project.

same logs in my docker container backend… ! I’II trying some possible solutions but not gone this error … After install the hrms then erpnext site is internal server error.

After watching the video, I started the process. HRMS was successfully installed, but my ERPNext site at localhost:8080 is showing an internal server error.

try bench build

i have tried… but it didn’t worked on my erpnext site !

share screenshot, also try uninstalling the hrms

Yes, of course, I have tried uninstalling HRMS and then reinstalling it. but still not worked…

Try these to remove

  1. bench --site [site-name] uninstall-app [app-name]
    
  2. bench remove-app [app_name] --force
    
  1. bench setup requirements.
    
  2. bench build
    
  3. bench migrate
    

I encountered an error when I used the command: bench setup requirements

error:
ERROR: /home/frappe/frappe-bench/apps/frappe
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
^^^^^
File “/usr/local/lib/python3.11/site-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/click/core.py”, line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/bench/commands/setup.py”, line 230, in setup_requirements
bench.setup.requirements(apps=apps)
File “/usr/local/lib/python3.11/site-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/bench/bench.py”, line 464, in requirements
app = App(path_to_app, bench=self.bench, to_clone=False).install(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/bench/app.py”, line 185, in init
super().init(name, branch, *args, **kwargs)
File “/usr/local/lib/python3.11/site-packages/bench/app.py”, line 85, in init
self.setup_details()
File “/usr/local/lib/python3.11/site-packages/bench/app.py”, line 101, in setup_details
self._setup_details_from_mounted_disk()
File “/usr/local/lib/python3.11/site-packages/bench/app.py”, line 119, in _setup_details_from_mounted_disk
self.git_repo = git.Repo(self.mount_path)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/git/repo/base.py”, line 289, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/frappe/frappe-bench/apps/frappe
INFO: A newer version of bench is available: 5.22.6 → 5.22.9

cd /home/frappe/frappe-bench/apps/frappe

then

git status

share the results

git status :
On branch main
Your branch and ‘origin/main’ have diverged,
and have 1417 and 1 different commits each, respectively.
(use “git pull” to merge the remote branch into yours)

Changes not staged for commit:
(use “git add/rm …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
modified: pwd.yml

Untracked files:
(use “git add …” to include in what will be committed)
docker-helper.yml
site_config.json
tmp/

no changes added to commit (use “git add” and/or “git commit -a”)

was changese to my pwd.yml file."…set-default (site name) ; and FRAPPE_SITE_NAME_HEADER: (site name)