Hi Community,
I was trying to create a POST request for Employee Checkin but encountered the following :
frappe.exceptions.ValidationError: No Employee found for the given employee field value. ‘attendance_device_id’: ‘HR-EMP-00005’
PS: I do have employee ‘HR-EMP-00005’ in my system.
Traceback:
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/frappe/frappe/app.py”, line 64, in application
response = frappe.api.handle()
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/frappe/frappe/api.py”, line 58, in handle
return frappe.handler.handle()
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/frappe/frappe/handler.py”, line 30, in handle
data = execute_cmd(cmd)
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/frappe/frappe/handler.py”, line 69, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/frappe/frappe/init.py”, line 1085, in call
return fn(*args, **newargs)
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/erpnext/erpnext/hr/doctype/employee_checkin/employee_checkin.py”, line 61, in add_log_based_on_employee_field
frappe.throw(_(“No Employee found for the given employee field value. ‘{}’: {}”).format(employee_fieldname,employee_field_value))
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/frappe/frappe/init.py”, line 396, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable)
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/frappe/frappe/init.py”, line 375, in msgprint
_raise_exception()
File “/home/frappe/benches/bench-version-13-2020-07-02/apps/frappe/frappe/init.py”, line 326, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: No Employee found for the given employee field value. ‘attendance_device_id’: HR-EMP-00003
This is the attendance_device_id field which takes employee_field_value in Employee, this number should be same for the employee in your Attendance Device.
Hello, I am a newbie to ERPNext and I want to integrate a fingerprint biometric device to the attendance system. I was reading the documentation, but I cannot open the implementation details anymore (step 4 of integrating erpnext with biometric devices). Could you help me on how I could implement this API?
I am facing same error, I am updating biometric device logs to Frappe erp software using C# service, receiving following error, please update me where can I find mapping which is shown in the table image.(posted by @iRaySpace )
Error:
{“exc_type”:“ValidationError”,“exception”:“frappe.exceptions.ValidationError: No Employee found for the given employee field value. ‘attendance_device_id’: 35”,“exc”:“["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 66, in application\n response = frappe.api.handle()\n File \"apps/frappe/frappe/api.py\", line 55, in handle\n return frappe.handler.handle()\n File \"apps/frappe/frappe/handler.py\", line 38, in handle\n data = execute_cmd(cmd)\n File \"apps/frappe/frappe/handler.py\", line 76, in execute_cmd\n return frappe.call(method, **frappe.form_dict)\n File \"apps/frappe/frappe/init.py\", line 1473, in call\n return fn(*args, **newargs)\n File \"apps/erpnext/erpnext/hr/doctype/employee_checkin/employee_checkin.py\", line 91, in add_log_based_on_employee_field\n employee_fieldname, employee_field_value\n File \"apps/frappe/frappe/init.py\", line 511, in throw\n as_list=as_list,\n File \"apps/frappe/frappe/init.py\", line 479, in msgprint\n _raise_exception()\n File \"apps/frappe/frappe/init.py\", line 434, in _raise_exception\n raise raise_exception(msg)\nfrappe.exceptions.ValidationError: No Employee found for the given employee field value. ‘attendance_device_id’: 35\n"]”,“_server_messages”:“["{\"message\": \"No Employee found for the given employee field value. ‘attendance_device_id’: 35\", \"title\": \"Message\", \"indicator\": \"red\", \"raise_exception\": 1}"]”}