MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    I'm also getting an error while running the final magic mirror script after installing and adding all the face recognition module.

    Scheduled Pinned Locked Moved Troubleshooting
    7 Posts 3 Posters 763 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sdetweil @tolin
      last edited by sdetweil

      @tolin said in I'm also getting an error while running the final magic mirror script after installing and adding all the face recognition module.:

      PythonShell is not a constructor

      Your node_helper use of the pythonshell library doesn’t match the code

      Edit the node_helper.js and change the line to this

      const { PythonShell } = require('pythonshell')
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      T 1 Reply Last reply Reply Quote 0
      • T Offline
        tolin @sdetweil
        last edited by

        @sdetweil Thanks!! that worked for me… !! but now another error is showing

        crop = face.crop(image, x, y, w, h)
        File “/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/face.py”, line 93, in crop
        return image[y1:y2, x:x + w]
        TypeError: slice indices must be integers or None or have an index method

        Hardware using:
        Pi Camera
        Raspberry pi 3 model b+

        Software details:
        Phython version - 3.7.3
        OpenCV version - 4.4.0
        Numpy - 1.20.3

        S S 2 Replies Last reply Reply Quote 0
        • S Offline
          sdetweil @tolin
          last edited by

          @tolin no idea … maybe there aren’t any images for this face? (just guessing)
          don’t know how the module does its work

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          T 1 Reply Last reply Reply Quote 0
          • T Offline
            tolin @sdetweil
            last edited by

            @sdetweil Thanks for the reply.

            1 Reply Last reply Reply Quote 0
            • S Offline
              stacywebb @tolin
              last edited by

              @tolin You have to train the model first before it will work.
              Instructions for model training are here

              T 1 Reply Last reply Reply Quote 0
              • T Offline
                tolin @stacywebb
                last edited by

                @stacywebb Hi, I have completed the training and also I done with the face recognition trial. But this error comes in between, sometime it works but often this error shows. Any luck??

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy