Salam , have you found that solution we have same scenario
Hello,
Thank you for this great tool. I have successfully connected to the device and I think it is pushing the data to ERPNext. My question is how do i see the report? How do i know the data is there in ERPNext?
These is the log i see
2024-11-25 12:45:27,629 INFO Cleared for lift off!
2024-11-25 12:45:27,629 INFO Processing Device: IFACE360
2024-11-25 12:45:27,741 INFO 192.168.100.201 Device Disable Attempted. Result: True
2024-11-25 12:45:27,811 INFO 192.168.100.201 Attendances Fetched: 4
2024-11-25 12:45:27,859 INFO 192.168.100.201 Device Enable Attempted. Result: True
2024-11-25 12:45:27,879 INFO Mission Accomplished!
Hi,
You can check the same in ERPNext under HR–> Employee Checkin
Thanks,
Divyesh Mangroliya
@mangroliya thank you for your reply.
For some reason, I am not able to get the data on ERPNext. ERPNext is hosted on cloud and I have created the API key and secret.
I have added Attendance Device ID (Biometric/RF tag ID) of the employee on device to ERPNext.
Did I miss anything?
I think the tool has connected with the device but I am not sure if it has uploaded to ERPNext.
Anything I should be doing please?
Hi,
Please check the error in the log file stored under Biometric Tool folder → logs → error.log
Thanks,
Divyesh Mangroliya
@mangroliya thank you for your prompt reply.
It shows this error
2024-11-26 12:44:09,046 ERROR Error during ERPNext API Call. 3 1732521524.0 MB360 Traceback (most recent call last):
File “apps/frappe/frappe/handler.py”, line 74, in execute_cmd
method = get_attr(cmd)
File “apps/frappe/frappe/handler.py”, line 288, in get_attr
method = frappe.get_attr(cmd)
File “apps/frappe/frappe/init.py”, line 1715, in get_attr
return getattr(get_module(modulename), methodname)
File “apps/frappe/frappe/init.py”, line 1433, 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 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 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 ‘erpnext.hr’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 114, 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 76, in execute_cmd
frappe.throw(_(“Failed to get method for command {0} with {1}”).format(cmd, e))
File “apps/frappe/frappe/init.py”, line 602, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 567, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 518, in _raise_exception
raise exc
frappe.exceptions.ValidationError: Failed to get method for command erpnext.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field with No module named ‘erpnext.hr’
2024-11-26 12:44:09,054 ERROR exception when calling pull_process_and_push_data function for device{“device_id”: “Iface365”, “ip”: “192.168.100.201”, “punch_direction”: “”, “clear_from_device_on_fetch”: “”}
Traceback (most recent call last):
File “C:\biometric-attendance-sync-tool-v1.0-win64\erpnext_sync.py”, line 51, in main
pull_process_and_push_data(device, device_attendance_logs)
File “C:\biometric-attendance-sync-tool-v1.0-win64\erpnext_sync.py”, line 129, in pull_process_and_push_data
raise Exception(‘API Call to ERPNext Failed.’)
Exception: API Call to ERPNext Failed.
FYI … i am using version 15 and HR module is installed
Hi,
Please update the correct version in your local_config file in biometric sync tool folder:
Regards.
Divyesh Mangroliya
Thank you for your reply. I can’t find ERPNEXT_VERSION under the local config. Should I add it?
Hi,
Please fetch the latest version of biometric Sync tool from Github otherwise it will not work even if you add it manually.
Thanks,
Divyesh Mangroliya
Thank you.
The latest version has no GUI ? The GUI version is “Version 1” but it doesn’t have ERPNEXT verion option under “local_config”.
Any Solutions?
Hello guys, I have recently tried connecting to the attendance machine and it was working fine, but lately I have deleted all employee check-in and attendance from frappe hr because I have changed some settings on configuring shift. I wanted to fetch new data from the attendance machine and visualise it with the new updated shift setting. But I keep getting an error on checking on logs while running the service.
This is from logs.log
2025-04-30 16:47:10,388 ERROR Device Attendance Dump Found in Log Directory. This can mean the program crashed unexpectedly. Ret>
2025-04-30 16:47:10,510 INFO Mission Accomplished!
2025-04-30 16:48:10,519 INFO Cleared for lift off!
2025-04-30 16:48:10,520 INFO Processing Device: 1
2025-04-30 16:48:10,520 ERROR Device Attendance Dump Found in Log Directory. This can mean the program crashed unexpectedly. Ret>
2025-04-30 16:48:10,777 INFO Mission Accomplished!
and error.log
2025-04-30 16:55:11,848 ERROR exception when calling pull_process_and_push_data function for device{"device_id": "1", "ip": "192>
Traceback (most recent call last):
File "/home/USER_NAME/erpnext_sync.py", line 63, in main
pull_process_and_push_data(device, device_attendance_logs)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/liyuadmin/biometric-attendance-sync-tool-1.1/erpnext_sync.py", line 143, in pull_process_and_push_data
raise Exception('API Call to ERPNext Failed.')
Exception: API Call to ERPNext Failed.
I haven’t got a successful attendance log yet, but here is a log from attendance_failed_log
2025-04-30 16:21:05,966 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:22:06,097 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:23:06,226 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:24:06,446 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:25:06,659 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:26:06,877 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:27:07,107 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:28:07,240 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:29:07,357 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:30:07,480 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:31:07,616 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:32:07,836 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:33:08,038 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:34:08,183 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:35:08,406 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:36:08,636 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:37:08,849 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:38:09,086 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:39:09,219 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:40:09,440 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:41:09,576 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:42:09,716 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:43:09,838 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:44:09,968 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:45:10,132 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:46:10,378 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:47:10,508 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:48:10,775 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:49:11,022 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:50:11,169 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:51:11,302 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:52:11,452 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:53:11,589 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:54:11,719 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:55:11,847 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
2025-04-30 16:56:12,086 ERROR 417 1 14 1665820894.0 0 15 {"uid": 1, "user_id": "14", "timestamp": "2022-10-15 11:01:34", "status": 15, "punch": 0}
Can someone please support me on this? Thanks
Ok, for anyone facing the same issue, I am using Caddy as a reverse proxy and local HTTPS for ERPNext, and I needed to add the root.pem to the trusted local store. That was the reason, after I did that, I got another issue, which is
frappe.exceptions.ValidationError: Latitude and longitude values are required for checking in.
This error is caused because of “Allow Geolocation Tracking” HR Settings, after I disabled that all employee checking was fetched.