Getting error file saving the face_data to file

np.save(dataset_path+file_name+’.py’,face_data)

upon running this command , the file contains this message:
Error ! is not UTF-8 encoded .
Saving desabled.
See console for more details.

Hey @poojasiwach359, have you created the folder before, as in ‘dataset_path’?

Yes i made that folder.the ‘file_name’ which should be consisting of data… says
Error ! is not UTF-8 encoded .
Saving desabled.
See console for more details.

Hey @poojasiwach359, could you please share the .py file after saving it on cb.lk/ide

Hey @poojasiwach359, your file ran perfectly on my system. Try once again after these changes,

  1. In line 11, dataset_path = “./faceData/”
  2. the folder in which your .py exists make a folder named ‘faceData’
  3. Make sure on terminal you got the shape of face_data correct.

If doubt persists, than let me know. Also share the ss of the terminal after running the file.

I am running this on jupyter notebook.
I have tried running .py on prompt as well - there comes different error -
Traceback (most recent call last):
File “genratingFaceData.py”, line 39, in
faces = face_cascade.detectMultiScale(frame,1.3,5)
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function ‘cv::CascadeClassifier::detectMultiScale’

and while running on jupyter notebook.All the commands ran successfully but the ‘file_name’ in dataset folder consists of this message =
Error ! is not UTF-8 encoded .
Saving desabled.
See console for more details.