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

API Call to ERPNext Failed. #46

Open
Hunt16 opened this issue Mar 2, 2023 · 2 comments
Open

API Call to ERPNext Failed. #46

Hunt16 opened this issue Mar 2, 2023 · 2 comments

Comments

@Hunt16
Copy link

Hunt16 commented Mar 2, 2023

ERROR exception when calling pull_process_and_push_data function for device{"device_id": "1", "ip": "192.168.100.201", "punch_direction": "AUTO", "clear_from_device_on_fetch": ""}
Traceback (most recent call last):
File "erpnext_sync.py", line 51, in main
pull_process_and_push_data(device, device_attendance_logs)
File "erpnext_sync.py", line 129, in pull_process_and_push_data
raise Exception('API Call to ERPNext Failed.')
Exception: API Call to ERPNext Failed.

@Mohd200
Copy link

Mohd200 commented Mar 21, 2023

Hello @karthikeyan5 @Anurag810 @KaviyaPeriyasamy @surajshetty3416 @rtdany10

I am facing the same Problem, the ('API Call to ERPNext Failed.')

I created a new User with HR Manager Role and generated API Secret and Key, and placed the Primary URL of ERPNext and still getting this error message:

2023-03-21 18:03:06,843 ERROR exception when calling pull_process_and_push_data function for device{"device_id": "1", "ip": "10.51.114.143", "punch_direction": "AUTO", "clear_from_device_on_fetch": ""}
Traceback (most recent call last):
File "C:\Users\mhmd-\OneDrive\Desktop\Output\Bio-metric sync tool\biometric-attendance-sync-tool-v1.0-win32\erpnext_sync.py", line 51, in main
pull_process_and_push_data(device, device_attendance_logs)
File "C:\Users\mhmd-\OneDrive\Desktop\Output\Bio-metric sync tool\biometric-attendance-sync-tool-v1.0-win32\erpnext_sync.py", line 129, in pull_process_and_push_data
raise Exception('API Call to ERPNext Failed.')
Exception: API Call to ERPNext Failed.

Please advice on how to reconnect the Biometric-attendance-sync-tool to the ERPNext.

@Mohd200
Copy link

Mohd200 commented Mar 23, 2023

Hello everyone and Good day

It turned out that I registered a new Fingerprint in the device and didn't link the User ID to an Employee HR Profile in the ERPNext.
Once I put the user ID in the Employee HR Profile it worked immediately.
However, this raise an issue, what if I need to add a new Fingerprint of a person that isn't an Employee to the Biometric Device?
The connection will definitely crash again.

@karthikeyan5 @Anurag810 @KaviyaPeriyasamy @surajshetty3416 @rtdany10
Please advise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants