Employee Checkins are failing to be fetched from biometric to erpnext

Script: Auto Attendance Biometric Tool
Problem: Checkins are not being fetched to the ERPNext instance.
Errror Log: API Call Failed.
ERPNext Version: 15
Frappe Version: 15
Authorisation Details are correct, have double checked.
Everything was working fine except couple of days back, it suddenly failed.

Error messages are as below.

Exception: API Call to ERPNext Failed.
< at 0x7f2b089bc790>, ‘url’: ‘’, ‘encoding’: 'I>2024-05-13 12:36:34,754 ERROR exception when calling pull_process_and_push_data function for device{“device_id”: “Machine1”, “ip”: “192.XXX.X.XX”, "punch_>Traceback (most recent call last):
File “/home/sigma/frappe-bench/biometric-attendance-sync-tool/erpnext_sync.py”, line 62, in main
pull_process_and_push_data(device, device_attendance_logs)
File “/home/sigma/frappe-bench/biometric-attendance-sync-tool/erpnext_sync.py”, line 140, in pull_process_and_push_data
raise Exception(‘API Call to ERPNext Failed.’)
Exception: API Call to ERPNext Failed.

Its really critical, can anyone provide some guidance on this.

Many thanks in adv.

The Error you posted suggests one of two things: either the base url or the api key and/or secret are incorrect or the base url was not reachable at the time the call was made.