-
Notifications
You must be signed in to change notification settings - Fork 55
struct.error: unpack requires a buffer of 2 bytes #41
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
Comments
...
finger = adafruit_fingerprint.Adafruit_Fingerprint(uart)
finger._debug = True
... What does the console read when that is done? |
Hi guys, I have solved the problem, it's in the _send_data function, the checksum should concatenate ENDDATAPACKET on the last send. I have request pull on the main branch, I hope they accept my request. |
Nice! I'm working on getting my Pi set up to test this in the coming days, hopefully someone can get to it faster! |
Hi, I am using r307 fingerprint sensor. I'm trying to compare fingerprint template by uploading it to the fingerprint sensor flash storage.
I'm trying to run this example code.
Here is the piece of code from the example which I failed to run. I've already saved the fingerprint template('template0.dat') file before executing this code.
I got following error:
Waiting for finger print...
Templating...
Loading file template...Traceback (most recent call last):
File "/home/mockupsystem/Adafruit_CircuitPython_Fingerprint/examples/fingerprint_template_file_compare.py", line 203, in
fingerprint_check_file()
File "/home/mockupsystem/Adafruit_CircuitPython_Fingerprint/examples/fingerprint_template_file_compare.py", line 73, in fingerprint_check_file
i = finger.compare_templates()
File "/home/mockupsystem/python-env/some/lib/python3.10/site-packages/adafruit_fingerprint.py", line 323, in compare_templates
self.confidence = struct.unpack(">H", bytes(r[1:3]))
struct.error: unpack requires a buffer of 2 bytes
The text was updated successfully, but these errors were encountered: