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

Getting error while fetching attendance now #70

Open
midhat2020 opened this issue Jan 13, 2025 · 2 comments
Open

Getting error while fetching attendance now #70

midhat2020 opened this issue Jan 13, 2025 · 2 comments

Comments

@midhat2020
Copy link

midhat2020 commented Jan 13, 2025

Hey,
Previously we got the attendance as expected. But after updating to latest version the following errors are as follows:
Error Log
2025-01-10 16:18:11,023 ERROR exception when calling pull_process_and_push_data function for device{"device_id": "1", "ip": "192.168.1.5", "punch_direction": "AUTO", "clear_from_device_on_fetch": false}
Traceback (most recent call last):
File "Y:\Midhat Shaikh\Latest Biometric\biometric-attendance-sync-tool-master\erpnext_sync.py", line 62, in main
pull_process_and_push_data(device, device_attendance_logs)
File "Y:\Midhat Shaikh\Latest Biometric\biometric-attendance-sync-tool-master\erpnext_sync.py", line 128, in pull_process_and_push_data
erpnext_status_code, erpnext_message = send_to_erpnext(device_attendance_log['user_id'], device_attendance_log['timestamp'], device['device_id'], punch_direction)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Y:\Midhat Shaikh\Latest Biometric\biometric-attendance-sync-tool-master\erpnext_sync.py", line 193, in send_to_erpnext
response = requests.request("POST", url, headers=headers, json=data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pstnhr03\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pstnhr03\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pstnhr03\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pstnhr03\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\pstnhr03\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 787, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\pstnhr03\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 493, in _make_request
conn.request(
File "C:\Users\pstnhr03\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connection.py", line 444, in request
self.putheader(header, value)
File "C:\Users\pstnhr03\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connection.py", line 358, in putheader
super().putheader(header, *values)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2288.0_x64__qbz5n2kfra8p0\Lib\http\client.py", line 1309, in putheader
values[i] = one_value.encode('latin-1')
^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'latin-1' codec can't encode character '\ufeff' in position 37: ordinal not in range(256)

ERPNext: v15.42.0 (HEAD)
Frappe Framework: v15.47.2 (HEAD)
Frappe HR: v15.35.3 (HEAD)

@midhat2020 midhat2020 changed the title Getting Error while fetching attendance now Getting error while fetching attendance now Jan 13, 2025
@midhat2020
Copy link
Author

@midhat2020
Copy link
Author

@ankush Any update?

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

1 participant