Read the statement by Michael Teeuw here.
Face Recognition - File can't be opened for writing
-
Looks like it doesn’t have permission to open your trainingFile:
model.load(json.loads(sys.argv[1])[“trainingFile”]) cv2.error: /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/contrib/src/facerec.cpp:325: error: (-2) File can’t be opened for writing! in function load
Notice the
File can't be opened for writing
message.Wherever it’s trying to create that file, the main process running MM can’t write to that location.
-
Probably it does not even exist in that path. Be sure to add the training file path to the conduct of put it in the module folder.
-
The XML file is located in the module path mmm-facial-recognition.
I will answer more precisely when I’m back hat home -
So, my internet is back after a day :D
I reinstalled the module with deleting & cloning it again.
The training.xml is located in
/home/pi/MagicMirror/modules/MMM-Facial-Recognition
I installed open cv with
sudo apt-get install libopencv-dev python-opencv
after this, i went into the folder
MMM-Facial-Recognition
and typed
sudo npm install
I still get the same error MSG :(
i also changed the rights on the training.xml to Anyone/Anyone/Anyone
please help <3
-
@feuerball try putting it somewhere else and set the
trainingFile
setting in your config :) -
well i rewrote the destination of the file @ the config again and now it works.
seems like there was an error anywhere :D
thanks :)
-
@feuerball I didn’t understand what is the config
I am having the same error