MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. ghiesseldorf
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    G
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 13
    • Groups 0

    Posts

    Recent Best Controversial
    • MMM-Face-Reco-DNN TypeError: '<' not supported between instances of 'numpy.ndarray' and 'str'

      Running on Raspberry Pi 3 and Pi-camera on Raspian buster latest. When testing the MMM-Face_Reco-DDN facerecognition.py module stand alone, faces are correctly identified in the camera and [names] output. However, when running from MagicMirror, the error occurs, and it looks like it is complaining about improper use of a boolean operator in the code. I don’t know python data class rules, but if this was a code issue, surely others woudl have seen it in this module? Do I maybe have a lost data class object or something? PythonSherrError: TypeError: ‘<’ not supported between instances of ‘numpy.ndarray’ and ‘str’ is received, and the python traceback seems to point to the facerecognition.py module.```

      [ERROR]  Whoops! There was an uncaught exception...
      [2020-07-20 13:16:36.029] [ERROR]  PythonShellError: TypeError: '<' not supported between instances of 'numpy.ndarray' and 'str'
          at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21)
          at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32)
          at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13)
          at ChildProcess.emit (events.js:200:13)
          at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
          ----- Python Traceback -----
          File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 143, in <module>
            if minDistance < args["tolerance"]: {
        traceback: 'Traceback (most recent call last):\n  File ' +
          '"modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line ' +
          '143, in <module>\n    if minDistance < args["tolerance"]:\n' +
          "TypeError: '<' not supported between instances of " +
          "'numpy.ndarray' and 'str'\n",
        executable: 'python3',
        options: null,
        script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py',
        args: [
          '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml',
          '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle',
          '--usePiCamera=1',
          '--source=0',
          '--rotateCamera=0',
          '--method=dnn',
          '--detectionMethod=hog',
          '--interval=2000',
          '--output=0',
          '--extendDataset=False',
          '--dataset=modules/MMM-Face-Reco-DNN/dataset/',
          '--tolerance=0.6'
        ],
        exitCode: 1
      
      
      posted in Troubleshooting
      G
      ghiesseldorf
    • RE: MMM-Facial-Recognition-OCV3 FATAL: OpenCV Major Version must be 3

      @majik655 Thank-you, and interesting that you mentioned the MMM-Face-Reco-DDN module, because I gave up on the OCV3 module and moved to the DDN module. But, I’m getting an error in it that looks to be complaining about the use of a boolean operator (<) between different data types. The base facerecognition.py works just fine stand alone. But, when running with MagicMirror, the error occurs.

      posted in Troubleshooting
      G
      ghiesseldorf
    • MMM-Facial-Recognition-OCV3 FATAL: OpenCV Major Version must be 3

      I’m working a new install of MagicMirror MMM-Facial-Recognition-OCV3 module on Raspberry Pi Buster 10 with CV2 version 4.3.0. When running the training module, it ends with the message FATAL: OpenCV Major Version must be 3. Is there a known fix without backing CV2 back to version 3.x?

      posted in Troubleshooting
      G
      ghiesseldorf
    • 1 / 1