zk.exception.ZKNetworkError: timed out error while doing biometric integration

Hello @karthikeyan5
I want to integrate biometric device with Erpnext for that I am running the biometric integration tool in client PC but I am getting below error

2023-02-16 12:14:28,210	ERROR	192.168.1.117 exception when fetching from device...
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out
2023-02-16 12:14:28,223	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1739274", "ip": "192.168.1.117", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 89, in pull_process_and_push_data
    device_attendance_logs = get_all_attendance_from_device(device['ip'], device_id=device['device_id'], clear_from_device_on_fetch=device['clear_from_device_on_fetch'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 170, in get_all_attendance_from_device
    raise Exception('Device fetch failed.')
Exception: Device fetch failed.
2023-02-16 12:15:32,329	ERROR	192.168.1.117 exception when fetching from device...
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out
2023-02-16 12:15:32,332	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1739274", "ip": "192.168.1.117", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 89, in pull_process_and_push_data
    device_attendance_logs = get_all_attendance_from_device(device['ip'], device_id=device['device_id'], clear_from_device_on_fetch=device['clear_from_device_on_fetch'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 170, in get_all_attendance_from_device
    raise Exception('Device fetch failed.')
Exception: Device fetch failed.
2023-02-16 12:16:36,461	ERROR	192.168.1.117 exception when fetching from device...
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out
2023-02-16 12:16:36,464	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1739274", "ip": "192.168.1.117", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 89, in pull_process_and_push_data
    device_attendance_logs = get_all_attendance_from_device(device['ip'], device_id=device['device_id'], clear_from_device_on_fetch=device['clear_from_device_on_fetch'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 170, in get_all_attendance_from_device
    raise Exception('Device fetch failed.')
Exception: Device fetch failed.
2023-02-16 12:17:40,573	ERROR	192.168.1.117 exception when fetching from device...
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out
2023-02-16 12:17:40,576	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1739274", "ip": "192.168.1.117", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 89, in pull_process_and_push_data
    device_attendance_logs = get_all_attendance_from_device(device['ip'], device_id=device['device_id'], clear_from_device_on_fetch=device['clear_from_device_on_fetch'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 170, in get_all_attendance_from_device
    raise Exception('Device fetch failed.')
Exception: Device fetch failed.
2023-02-16 12:18:44,685	ERROR	192.168.1.117 exception when fetching from device...
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out
2023-02-16 12:18:44,688	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1739274", "ip": "192.168.1.117", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 89, in pull_process_and_push_data
    device_attendance_logs = get_all_attendance_from_device(device['ip'], device_id=device['device_id'], clear_from_device_on_fetch=device['clear_from_device_on_fetch'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 170, in get_all_attendance_from_device
    raise Exception('Device fetch failed.')
Exception: Device fetch failed.
2023-02-16 12:19:48,776	ERROR	192.168.1.117 exception when fetching from device...
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out
2023-02-16 12:19:48,779	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1739274", "ip": "192.168.1.117", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 89, in pull_process_and_push_data
    device_attendance_logs = get_all_attendance_from_device(device['ip'], device_id=device['device_id'], clear_from_device_on_fetch=device['clear_from_device_on_fetch'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 170, in get_all_attendance_from_device
    raise Exception('Device fetch failed.')
Exception: Device fetch failed.
2023-02-16 12:20:52,917	ERROR	192.168.1.117 exception when fetching from device...
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out
2023-02-16 12:20:52,920	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1739274", "ip": "192.168.1.117", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 89, in pull_process_and_push_data
    device_attendance_logs = get_all_attendance_from_device(device['ip'], device_id=device['device_id'], clear_from_device_on_fetch=device['clear_from_device_on_fetch'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 170, in get_all_attendance_from_device
    raise Exception('Device fetch failed.')
Exception: Device fetch failed.
2023-02-16 12:21:57,003	ERROR	192.168.1.117 exception when fetching from device...
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out
2023-02-16 12:21:57,006	ERROR	exception when calling pull_process_and_push_data function for device{"device_id": "1739274", "ip": "192.168.1.117", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 248, in __send_command
    self.__sock.send(top)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 149, in get_all_attendance_from_device
    conn = zk.connect()
           ^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 373, in connect
    cmd_response = self.__send_command(const.CMD_CONNECT)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\zk\base.py", line 260, in __send_command
    raise ZKNetworkError(str(e))
zk.exception.ZKNetworkError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
    pull_process_and_push_data(device, device_attendance_logs)
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 89, in pull_process_and_push_data
    device_attendance_logs = get_all_attendance_from_device(device['ip'], device_id=device['device_id'], clear_from_device_on_fetch=device['clear_from_device_on_fetch'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\biometric-attendance-sync-tool-master\erpnext_sync.py", line 170, in get_all_attendance_from_device
    raise Exception('Device fetch failed.')
Exception: Device fetch failed.

Please help me with it

Thank you

@CodeOne id you get solution for this

looks like the script could not connect with the device, please check if you set it up correctly