You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to store a fingerprint template in a file, and then compare it with one newly obtained with the sensor. For that I'm using the code in the example you provided (examples/fingerprint_tempalte_file_compare.py).
Im getting the following error:
Traceback (most recent call last):
File "/home/pi/biometrics/tests/fingerprint_compare_files.py", line 200, in <module>
fingerprint_check_file()
File "/home/pi/biometrics/tests/fingerprint_compare_files.py", line 72, in fingerprint_check_file
i = finger.compare_templates()
File "/usr/local/lib/python3.9/dist-packages/adafruit_fingerprint.py", line 324, in compare_templates
self.confidence = struct.unpack(">H", bytes(r[1:3]))
struct.error: unpack requires a buffer of 2 bytes
The value of r after r = self._get_packet(14) is [1], which is the code for PACKETRECIEVEERR.
So what is happening? The sensor is unable to make the comparison? The problem is the _COMPARE instruction or it may be the data that was sended before?
Note that everything works for the flash memory option (examples/fingerprint_simpletest_rpi.py).
Thank you.
The text was updated successfully, but these errors were encountered:
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.
I want to store a fingerprint template in a file, and then compare it with one newly obtained with the sensor. For that I'm using the code in the example you provided (examples/fingerprint_tempalte_file_compare.py).
Im getting the following error:
Which is relted to this function:
The value of
r
afterr = self._get_packet(14)
is[1]
, which is the code forPACKETRECIEVEERR
.So what is happening? The sensor is unable to make the comparison? The problem is the
_COMPARE
instruction or it may be the data that was sended before?Note that everything works for the flash memory option (examples/fingerprint_simpletest_rpi.py).
Thank you.
The text was updated successfully, but these errors were encountered: