Open Hamster1962 opened 3 months ago
Same error here, Ubuntu 22.04 LTS. I've tried also cloning the git repo and building from source, but I've got the exact same error (maybe related to dlib?)
Edit: I've tried other .deb from howdy ppa and the error is the same.
emerson@emerson-a60muv:~/howdy$ sudo howdy add
Adding face model for the user emerson
Enter a label for this new model [Initial model] (max 24 characters):
Please look straight into the camera
Traceback (most recent call last):
File "/usr/local/bin/howdy", line 95, in <module>
import cli.add
File "/usr/lib/security/howdy/cli/add.py", line 155, in <module>
face_locations = face_detector(gsframe, 1)
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_lib_security_howdy_cli.py.0.crash'
Original exception was:
Traceback (most recent call last):
File "/usr/local/bin/howdy", line 95, in <module>
import cli.add
File "/usr/lib/security/howdy/cli/add.py", line 155, in <module>
face_locations = face_detector(gsframe, 1)
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
@Hamster1962
try to reinstall ffmpeg
.
I did it on vanilla Arch Linux and the issue got fixed!
Same error here today on a Garuda linux using KDE Plasma + Wayland + howdy-beta-git from AUR archive
[sudo] password for skj:
Attempting facial authentication
Traceback (most recent call last):
File "/usr/lib/howdy/compare.py", line 302, in <module>
face_locations = face_detector(gsframe, 1)
^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
Reinstall ffmpeg package does not resolve this error.
It looks like that it is the same problem as described in: https://github.com/boltgolt/howdy/issues/928 TL; DR: There is no solution available yet, just a workaround (thanks to simonporter007): you should downgrade numpy to v.1.26.4. Howdy (actually dlib) does not support numpy 2.0. For Arch Linux please refer to the manual: https://wiki.archlinux.org/title/downgrading_packages I' suggest using the downgrade script: https://aur.archlinux.org/packages/downgrade It worked just fine for me and fixed the issue.
It might be something to do with ffmpeg but i don't know the answer. The clue is on the bottom line. (ImportError: libavdevice.so.60: cannot open shared object file: No such file or directory) Which is concerned with ffmpeg........
~~@this-username-has-been-taken Did it work right away for you? I tried downgrading but now it has import issues~~
Nvm I'm dumb, I downgraded to 1.26.4-1 when there was 1.26.4-2 available, it now works fine
@Hamster1962 , sorry it didn't work for you. One more suggestion, based on https://stackoverflow.com/questions/12901706/ffmpeg-error-in-linux and https://web.archive.org/web/20141223015653/http://linuxserverguide.wordpress.com:80/2010/10/15/ffmpeg-error-while-loading-shared-libraries-libavdevice-so-52-cannot-open-shared-object-file/
sudo find / -name libavdevice.so.60
/etc/ld.so.conf
filesudo ldconfig
@talpinum , yes - everything went back to normal just after the downgrade to 1.26.4-2. I am grad it worked for you too!
That's interesting, I don't have the file libavdevice.so.60 Anywhere.
Well folks, I think we have an answer. I didn't have a copy of 'libavdevice.so.60' I had earlier 58 & 59 and later 61 but no 60. This version is available in FFmpeg 6.1.1 "Heaviside" from the website
https://www.ffmpeg.org/download.html#releases. Download and install version 6.1.1.
That mostly fixed it, but the error:-
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
Now appears. So, down-grade 'numpy' from version 2.0.0 to version 1.26.4 as above and it's fixed, certainly for me. Going forward, ignore updates to ffmpeg and numpy in pacman.conf until someone works out what happened.
Thanks everyone, every little bit of information helped to understand the problem.
@Hamster1962 , I have ffmpeg ver. 2:7.0.1-1 installed and do not have 'libavdevice.so.60' file in the system too, just 58 and 61:
/usr/lib/libavdevice.so.61
/usr/lib/libavdevice.so.61.1.100
/usr/lib/libavdevice.so.58
/usr/lib/libavdevice.so.58.13.100
I only got the error about unsupported image type. Anyway, glad that you found the solution.
@Hamster1962 , did you by chance installed Howdy Beta? If so, look for /lib/security/pam_howdy.so
instead of /lib/security/howdy/pam.py
.
For example, my configuration:
%PAM-1.0
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth sufficient pam_howdy.so
<Here go other, default lines>
I.e. I have added two lines just after %PAM-1.0
. They allow password authentication as well as Howdy authentication and work as follows:
Also, just a reminder. Check if your IR emitter is blinking and the image is also blinking (howdy test
) when Howdy is in operation. If not - it doesn't work properly. Use this to fix it: https://github.com/EmixamPP/linux-enable-ir-emitter
Looks like we were both right. There is no /lib/security/howdy folder with Ver 3.0.0 Beta
The lock screen issue was fixed by changing the file permissions with
sudo chmod -R 755 /etc/howdy/
Once again, thanks for all your help.
I had the same problem, but I solved it by updating python-dlib-git from the AUR, where the code was already merged!
I use python-dlib
pre-compiled package from the arch4edu repo.
python-dlib-git
from AUR returns error in my case for some reason...
btw, older versions of numpy for Arch Linux can be downloaded can be downloaded from their official archive servers: https://archive.archlinux.org/packages/p/python-numpy/
Hi I'm so sorry to raise this again. Arch Linux updates give the following error -
error: failed to prepare transaction (could not satisfy dependencies)
:: installing libplacebo (7.349.0-1) breaks dependency 'libplacebo.so=338-64' required by ffmpeg6.1
Attempts to individually update either of these packages by force or over-write etc break howdy - A re-install of Howdy does not help Howdy appears very fragile right now. Can someone have a look please.
Of course, ignoring these three package updates in 'pacman.conf' is a temporary solution but a permanent solution would be good.
2024/9/4 update: In my Garuda linux machines x 2
numpy 2.0.1, howdy-beta-git 2.6.1.r245.gaa75c76-1, python-dlib 19.24.6-1 ffmpeg 2:7.0.2-1, libplacebo 7.349.0-1
are compatible, and now Howdy works fine
Hi A recent large update causes Howdy to fail. One of these updates, I've tried reinstalling Howdy, dlib, python etc, no luck
The Error
I've searched for similar issues already, and my issue has not been reported yet.
Garuda (Arch) fully up to date
Restoring a previous snapshop fixes the issue until the next time the update is run