I keep coming across and issue using the adafruit_fingerprint circuit python lib on both the itsy and circuit playground. I have lib loaded and have been able to get the ready to the point of being able to read by removing some code from the "fingerprint_template_file_compare" anytime i try to go through the enroll_save_to_file call i get errors in get_gpdata .
I have not seen allot on the pid#4750 so is there something different i need to do for this sensor over the others on the site ?
I have opened up the adafruit_fingerprint.py but not sure where to look next .
ulta slim 4750 finger printer reader and CPE error
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- taymota
- Posts: 6
- Joined: Sun Jun 06, 2021 1:04 pm
- taymota
- Posts: 6
- Joined: Sun Jun 06, 2021 1:04 pm
Re: ulta slim 4750 finger printer reader and CPE error
anyone else have this issue? any help?
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: ulta slim 4750 finger printer reader and CPE error
Looks like you may be running into a memory issue. Does the simpletest example run OK?
https://github.com/adafruit/Adafruit_Ci ... pletest.py
https://github.com/adafruit/Adafruit_Ci ... pletest.py
- taymota
- Posts: 6
- Joined: Sun Jun 06, 2021 1:04 pm
Re: ulta slim 4750 finger printer reader and CPE error
No i get error when it trys to just load
"code.py output:
Traceback (most recent call last):
File "code.py", line 8, in <module>
File "adafruit_fingerprint.py", line 94, in <module>
MemoryError: memory allocation failed, allocating 296 bytes"
I was originally tried to use the QT py and thought maybe it did not have enough ram, so switched to circuit playground but got same issue.
"code.py output:
Traceback (most recent call last):
File "code.py", line 8, in <module>
File "adafruit_fingerprint.py", line 94, in <module>
MemoryError: memory allocation failed, allocating 296 bytes"
I was originally tried to use the QT py and thought maybe it did not have enough ram, so switched to circuit playground but got same issue.
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: ulta slim 4750 finger printer reader and CPE error
The QT PY and the Circuit Playground Express both use the same class of processor (SAMD21 M0). It looks like that does not have enough RAM for running this library. So, unfortunately, you'll need to upgrade to a board with more RAM.
- taymota
- Posts: 6
- Joined: Sun Jun 06, 2021 1:04 pm
Re: ulta slim 4750 finger printer reader and CPE error
So the guide has the Trinket M0 in it would that board work ?
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: ulta slim 4750 finger printer reader and CPE error
No, that's also an M0 based board. I just tested to verify and opened a new issue for this here:
https://github.com/adafruit/Adafruit_Ci ... /issues/33
It may have worked before and the library has now grown too big.
https://github.com/adafruit/Adafruit_Ci ... /issues/33
It may have worked before and the library has now grown too big.
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: ulta slim 4750 finger printer reader and CPE error
It seems like this library has unfortunately out grown the M0 based boards. We updated the guide to show usage with an M4 based board, which has higher RAM. If you want to stick with the M0, you could try using Arduino and the associated library:
https://github.com/adafruit/Adafruit-Fi ... or-Library
https://github.com/adafruit/Adafruit-Fi ... or-Library
- taymota
- Posts: 6
- Joined: Sun Jun 06, 2021 1:04 pm
Re: ulta slim 4750 finger printer reader and CPE error
Thank you for posting the update. that makes since. I have tried the sample code now on a RP2040 board running cp 7x and getting a new set of errors... and not sure why the sample code is throwing the error. should i open a new post in that area to see if someone can help ?
"
Place finger on sensor...Traceback (most recent call last):
File "code.py", line 186, in <module>
File "code.py", line 94, in enroll_finger
OSError: [Errno 22] Invalid argument
"
"
Place finger on sensor...Traceback (most recent call last):
File "code.py", line 186, in <module>
File "code.py", line 94, in enroll_finger
OSError: [Errno 22] Invalid argument
"
- taymota
- Posts: 6
- Joined: Sun Jun 06, 2021 1:04 pm
Re: ulta slim 4750 finger printer reader and CPE error
Never mind i think i figured it out , the sample code has "flush=True" at the end of most of the print commands and that was causing the invalid argument. Wonder if this was just implemented wrong or no longer needed in cp 7 and code was for cp6 ?
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: ulta slim 4750 finger printer reader and CPE error
Looks like a known issue:
https://github.com/adafruit/Adafruit_Ci ... /issues/32
https://github.com/adafruit/Adafruit_Ci ... /issues/32
Please be positive and constructive with your questions and comments.