Hi everybody. I am facing hrms problem in erpnext. I first installed erpnext through frappe_docker with a simple installation following:https://github.com/frappe/frappe_docker
. Then I installed HRMS by calling the command “bench get-app hrms
bench install-app hrms” After installation, I accessed my app on localhost and had the HR module with functions. However, when I performed the function to import data of 1 employee, I received absolutely no response. pending(status pending). After checking background jobs I get the error:
Job Name
Traceback (most recent call last):
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/rq/worker.py", line 1428, in perform_job
rv = job.perform()
^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/rq/job.py", line 1278, in perform
self._result = self._execute()
^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/rq/job.py", line 1315, in _execute
result = self.func(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 194, in execute_job
frappe.connect(site)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 328, in connect
init(site)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 313, in init
setup_module_map(include_all_apps=not (frappe.request or frappe.job or frappe.flags.in_migrate))
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1692, in setup_module_map
for module in get_module_list(app):
^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1540, in get_module_list
return get_file_items(get_app_path(app_name, "modules.txt"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1505, in get_app_path
return get_pymodule_path(app_name, *joins)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1535, in get_pymodule_path
return abspath(join(dirname(get_module(scrub(modulename)).__file__ or ""), *joins))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1476, in get_module
return importlib.import_module(modulename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
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'
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.:
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.