Hey! I managed to ‘complete the training’ and copied training.xml
into the modules folder, it recognized my face during testing and everything, however, I get this error when doing npm start
and I have no clue what it means:
Starting MagicMirror: v2.1.1
Loading config ...
Loading module helpers ...
Initializing new module helper ...
Module helper loaded: MMM-Facial-Recognition
No helper found for module: clock.
No helper found for module: compliments.
All module helpers loaded.
Starting server on port 8080 ...
Starting server op port 8080 ...
Server started ...
Connecting socket for: MMM-Facial-Recognition
Staring module helper: MMM-Facial-Recognition
Sockets connected & modules started ...
Launching application.
[MMM-Facial-Recognition] Facerecognition started...
[MMM-Facial-Recognition] Loading training data...
[MMM-Facial-Recognition] ALGORITHM: LBPH
[MMM-Facial-Recognition] Training data loaded!
[MMM-Facial-Recognition] --------------------
[MMM-Facial-Recognition] Webcam ausgewählt...
Whoops! There was an uncaught exception...
{ Error: TypeError: Required argument 'device' (pos 1) not found
at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_modules/python-shell/index.js:183:17)
at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_modules/python-shell/index.js:98:28)
at ChildProcess. (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_modules/python-shell/index.js:88:9)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
----- Python Traceback -----
File "modules/MMM-Facial-Recognition/facerecognition/facerecognition.py", line 63, in
camera = config.get_camera()
File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition/facerecognition/config.py", line 57, in get_camera
return webcam.OpenCVCapture(device_id=0)
File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition/facerecognition/webcam.py", line 31, in __init__
self._camera.open()
traceback: 'Traceback (most recent call last):\n File "modules/MMM-Facial-Recognition/facerecognition/facerecognition.py", line 63, in \n camera = config.get_camera()\n File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition/facerecognition/config.py", line 57, in get_camera\n return webcam.OpenCVCapture(device_id=0)\n File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition/facerecognition/webcam.py", line 31, in __init__\n self._camera.open()\nTypeError: Required argument \'device\' (pos 1) not found\n',
executable: 'python',
options: null,
script: 'modules/MMM-Facial-Recognition/facerecognition/facerecognition.py',
args: [ '{"recognitionAlgorithm":1,"lbphThreshold":50,"fisherThreshold":250,"eigenThreshold":3000,"useUSBCam":true,"trainingFile":"modules/MMM-Facial-Recognition/training.xml","interval":2,"logoutDelay":15,"users":["Alex"],"defaultClass":"default","everyoneClass":"everyone","welcomeMessage":true}' ],
exitCode: 1 }
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues