howdy: Error when adding a face (since Ubuntu 20.04)

Since I upgraded to Ubuntu 20.04, Howdy does no longer work. I reinstalled Howdy (this worked), but when I try to add a face I get this error (after entering the name):

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 99, in <module>
    video_capture = VideoCapture(config)
  File "/usr/lib/security/howdy/recorders/video_capture.py", line 45, in __init__
    self._create_reader()
  File "/usr/lib/security/howdy/recorders/video_capture.py", line 115, in _create_reader
    self.internal = cv2.VideoCapture(
AttributeError: module 'cv2' has no attribute 'VideoCapture'
Exception ignored in: <function VideoCapture.__del__ at 0x7f05e9543700>
Traceback (most recent call last):
  File "/usr/lib/security/howdy/recorders/video_capture.py", line 55, in __del__
    self.internal.release()
AttributeError: 'NoneType' object has no attribute 'release'

I double checked that I selected the right camera (the IR one, not the normal webcam) during the Howdy installation.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 24 (2 by maintainers)

Most upvoted comments

For newbies:

I checked which device was the IR camera using ffmpeg. Mine was /dev/video2. ffmpeg -f v4l2 -list_formats all -i /dev/video2 The command spits a lot of output, but the last line says “Greyscale”: [video4linux2,v4l2 @ 0x562d4bfa59c0] Raw : gray : 8-bit Greyscale : 340x340

Next, I ran sudo howdy config and changed the value of “device_path” to “/dev/video2”.

After that, “sudo howdy add” ran correctly. I tested with “sudo howdy test”. (Actually, on my system, I need “sudo QT_X11_NO_MITSHM=1 howdy test”.)

If you care, I’ve got a Dell XPS 13 9370.

you can try sudo howdy config then changes, device_path = /dev/video0 it works for me in ubuntu 18.04 LTS

Similar issue on fresh install of Pop!_OS 20.04 (ubuntu). Is this related or do I make a separate bug report?

image

I got it figured out, for anyone with the same issue, make sure the “video2” in howdy config is replaced with the correct one for you pc, mine was video0

I’m thinking you’ll probably want to adjust frame_width and frame_height in Howdy to the resolution of your webcam, run “sudo howdy config” to edit the settings.

As for what resolution to set, you can follow the info here but in short, run “lsusb” to find your webcam Bus and Device id then put them into this command lsusb -s [your device bus here]:[your device ID here] -v | egrep “Width|Height”. The output is in pairs

Use smaller resolutions in your howdy config for more performance at the cost of accuracy, I’d assume 480p or 720p would be just fine(?)

I got fig

I suggest having the camera setup the way it was before (asked if it was the correct camera) but done when adding a face but only for the first time. I also suggest adding an argument for that as well.