Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

TypeError: Required argument 'device' (pos 1) not found

Hello, i am testing a python face-recognition script i found on git. But im currently unable to start capturing with my picamera. Im using this script but keep getting this error:

Traceback (most recent call last):
File "facerecognition.py", line 30, in <module>
camera = config.get_camera(preview)
File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/config.py", line 101, in get_camera
return webcam.OpenCVCapture(device_id=0)
File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/webcam.py", line 29, in __init__self._camera.open()
TypeError: Required argument 'device' (pos 1) not found

As i said im using a picam, opencv and python 2.7. Isn't __init__self._camera.open() going conform with opencv 3.3?

Thanks, best regards.

click to hide/show revision 2
retagged

updated 2017-11-03 01:07:07 -0600

berak gravatar image

TypeError: Required argument 'device' (pos 1) not found

Hello, i am testing a python face-recognition script i found on git. But im currently unable to start capturing with my picamera. Im using this script but keep getting this error:

Traceback (most recent call last):
File "facerecognition.py", line 30, in <module>
camera = config.get_camera(preview)
File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/config.py", line 101, in get_camera
return webcam.OpenCVCapture(device_id=0)
File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/webcam.py", line 29, in __init__self._camera.open()
TypeError: Required argument 'device' (pos 1) not found

As i said im using a picam, opencv and python 2.7. Isn't __init__self._camera.open() going conform with opencv 3.3?

Thanks, best regards.