title: OpenCV 4.0.0 SystemError: <class 'cv2.CascadeClassifier'> returned a result with an error set
body: <p>Hello I am trying to create a facial recognition program but I have a peculiar error:
  here is my code:</p>
  <pre><code>import cv2 as cv
  gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
  face_cascade = cv.CascadeClassifier(&quot;lbpcascade_frontalface.xml&quot;)
  faces = face_cascade.detectMultiScale(gray, scaleFactor=1.2, minNeighbors=5);
  </code></pre>
  <p>and this error is the output</p>
  <pre><code>SystemError: &lt;class 'cv2.CascadeClassifier'&gt; returned a result with an error set
  </code></pre>
  <p>I have &quot;lbpcascade_frontalface.xml&quot; in the working directory so that shouldn't be an issue</p>
  <p>if it helps when I enter</p>
  <pre><code>cv.__version__
  </code></pre>
  <p>I get</p>
  <pre><code>'4.0.0'
  </code></pre>