Skip to content

Comments

Fix: Handle invalid attendance timestamp (day out of range for month)#242

Open
rafiqul-altersense wants to merge 1 commit intofananimi:masterfrom
rafiqul-altersense:master
Open

Fix: Handle invalid attendance timestamp (day out of range for month)#242
rafiqul-altersense wants to merge 1 commit intofananimi:masterfrom
rafiqul-altersense:master

Conversation

@rafiqul-altersense
Copy link

This update fixes a ValueError caused by invalid date values returned from the biometric device. The error occurred in zk.base.get_attendance() when trying to decode timestamps where the day value exceeded the valid range for a given month. A safeguard has been added to prevent this issue by validating or skipping malformed timestamps, ensuring the sync process doesn't crash.

@rtdany10
Copy link
Contributor

This happens because data isn't split correctly.
Update you zk lib's code with the main branch's code. Most likely your local copy has outdated code.

For me, the fix was https://github.com/fananimi/pyzk/pull/166/changes

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

Successfully merging this pull request may close these issues.

2 participants