Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biometric data failed to fetch #1832

Closed
1 task done
dineshpanchal93 opened this issue May 30, 2024 · 2 comments · Fixed by #1839
Closed
1 task done

Biometric data failed to fetch #1832

dineshpanchal93 opened this issue May 30, 2024 · 2 comments · Fixed by #1839
Labels
bug Something isn't working released

Comments

@dineshpanchal93
Copy link

Information about bug

It was working before even changed the API's Keys as well still getting same error

Module

HR

Version

Version-15 all modules

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

2024-05-30 12:25:37,785	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "2", "ip": "192.168.0.224", "punch_direction": null, "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "D:\Blisstering biometric\erpnext_sync.py", line 61, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\Blisstering biometric\erpnext_sync.py", line 139, in pull_process_and_push_data
    raise Exception('API Call to ERPNext Failed.')
Exception: API Call to ERPNext Failed.


2024-05-30 12:25:37,243	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1", "ip": "192.168.0.222", "punch_direction": null, "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "D:\Blisstering biometric\erpnext_sync.py", line 61, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\Blisstering biometric\erpnext_sync.py", line 139, in pull_process_and_push_data
    raise Exception('API Call to ERPNext Failed.')
Exception: API Call to ERPNext Failed.
2024-05-30 12:25:37,783	ERROR	Error during ERPNext API Call.	VP1743	1715649082.0	2	None	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 1768, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/hrms/hrms/hr/doctype/employee_checkin/employee_checkin.py", line 109, in add_log_based_on_employee_field
    doc.insert()
  File "apps/frappe/frappe/model/document.py", line 291, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1091, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 962, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1322, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1304, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 959, in fn
    return method_object(*args, **kwargs)
  File "apps/hrms/hrms/hr/doctype/employee_checkin/employee_checkin.py", line 20, in validate
    self.fetch_shift()
  File "apps/hrms/hrms/hr/doctype/employee_checkin/employee_checkin.py", line 39, in fetch_shift
    shift_actual_timings = get_actual_start_end_datetime_of_shift(
  File "apps/hrms/hrms/hr/doctype/shift_assignment/shift_assignment.py", line 542, in get_actual_start_end_datetime_of_shift
    shift_timings_as_per_timestamp = get_employee_shift_timings(
  File "apps/hrms/hrms/hr/doctype/shift_assignment/shift_assignment.py", line 495, in get_employee_shift_timings
    prev_shift = get_employee_shift(
  File "apps/hrms/hrms/hr/doctype/shift_assignment/shift_assignment.py", line 417, in get_employee_shift
    shift_details = get_prev_or_next_shift(
  File "apps/hrms/hrms/hr/doctype/shift_assignment/shift_assignment.py", line 464, in get_prev_or_next_shift
    end_date = min(end_date, for_timestamp.date())
TypeError: can't compare datetime.datetime to datetime.date

Code of Conduct

  • I agree to follow this project's Code of Conduct
@frappe-pr-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 14.28.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@frappe-pr-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 15.22.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
2 participants