How to link Meteor to Opencv python

There is a button in web page in charge of activating the python script. And I used this package ( python-shell) to run the command. But I had this error, when the button is clicked. I can see the light of webcam turn on and then turn off. Besides, the script can be executed manully in cmd. So any ideas about this?

W20200409-19:24:18.229(8)? (STDERR) meteor://💻app/app/app.js:283
W20200409-19:24:18.271(8)? (STDERR)       if (err) throw err;
W20200409-19:24:18.272(8)? (STDERR)                ^
W20200409-19:24:18.273(8)? (STDERR)
W20200409-19:24:18.275(8)? (STDERR) PythonShellError: cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'
W20200409-19:24:18.276(8)? (STDERR)     at PythonShell.parseError (C:\Users\Yue Qi Dong\Documents\GitHub\attendanceSystem\node_modules\python-shell\index.js:260:21)
W20200409-19:24:18.277(8)? (STDERR)     at terminateIfNeeded (C:\Users\Yue Qi Dong\Documents\GitHub\attendanceSystem\node_modules\python-shell\index.js:139:32)
W20200409-19:24:18.277(8)? (STDERR)     at ChildProcess.<anonymous> (C:\Users\Yue Qi Dong\Documents\GitHub\attendanceSystem\node_modules\python-shell\index.js:131:13)
W20200409-19:24:18.278(8)? (STDERR)     at ChildProcess.emit (events.js:311:20)
W20200409-19:24:18.279(8)? (STDERR)     at ChildProcess.EventEmitter.emit (domain.js:482:12)
W20200409-19:24:18.279(8)? (STDERR)     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
W20200409-19:24:18.282(8)? (STDERR)     ----- Python Traceback -----
W20200409-19:24:18.282(8)? (STDERR)     File "C:\Users\Yue Qi Dong\face\", line 18, in <module>
W20200409-19:24:18.283(8)? (STDERR)       faces = face_cascade.detectMultiScale(gray, 1.1, 4) {
W20200409-19:24:18.284(8)? (STDERR)   traceback: 'Traceback (most recent call last):\r\n' +
W20200409-19:24:18.284(8)? (STDERR)     '  File "C:\\Users\\Yue Qi Dong\\face\\", line 18, in <module>\r\n' +
W20200409-19:24:18.285(8)? (STDERR)     '    faces = face_cascade.detectMultiScale(gray, 1.1, 4)\r\n' +
W20200409-19:24:18.285(8)? (STDERR)     "cv2.error: OpenCV(4.1.2) C:\\projects\\opencv-python\\opencv\\modules\\objdetect\\src\\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'\r\n" +
W20200409-19:24:18.286(8)? (STDERR)     '\r\n',
W20200409-19:24:18.286(8)? (STDERR)   executable: 'py',
W20200409-19:24:18.287(8)? (STDERR)   options: null,
W20200409-19:24:18.287(8)? (STDERR)   script: 'C:\\Users\\Yue Qi Dong\\face\\',
W20200409-19:24:18.287(8)? (STDERR)   args: null,
W20200409-19:24:18.288(8)? (STDERR)   exitCode: 1
W20200409-19:24:18.288(8)? (STDERR) }


  myPythonCall() {'C:/Users/Yue Qi Dong/face/', null, function (err) {
      if (err) throw err;

import cv2

flag = 1 
num = 1 

# Load the cascade
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')

    # To capture video from webcam.
cap = cv2.VideoCapture(0, cv2.CAP_DSHOW)

while True:
    # Read the frame
    _, img =
    # Convert to grayscale
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    # Detect the faces
    faces = face_cascade.detectMultiScale(gray, 1.1, 4)
    # Draw the rectangle around each face
    for (x, y, w, h) in faces:
        cv2.rectangle(img, (x, y), (x+w, y+h), (0, 255, 0), 2)
        sub_face = img[y:y+h, x:x+w]
    # Display
    cv2.imshow('img', img_flip)
    # Stop if escape key is pressed
    k = cv2.waitKey(30) & 0xff
    if k == ord('s'):  
        cv2.imwrite("C:/Windows/System32/face/"+ str(num) + ".jpg", sub_face)
        print("success to save"+str(num)+".jpg")
        num += 1

    elif k==27:

# Release the VideoCapture object

I would really appreciate it if someone can give me some idea.