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 666 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.
    • T Offline
      tolin
      last edited by

      Re: Facial Recognition Module - Step by Step Guide

      Can anyone help me to sort out this issue ?

      [ERROR] Whoops! There was an uncaught exception…
      [05.06.2021 13:32.51.510] [ERROR] TypeError: PythonShell is not a constructor
      at Class.python_start (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:11:21)
      at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:40:14)
      at Socket. (/home/pi/MagicMirror/js/node_helper.js:109:11)
      at Socket.emit (events.js:315:20)
      at Socket.emitUntyped (/home/pi/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22)
      at /home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:428:39
      at processTicksAndRejections (internal/process/task_queues.js:79:11)
      [05.06.2021 13:32.51.524] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [05.06.2021 13:32.51.525] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

      @paulGu Hi, were you able to resolve it?

      S 1 Reply Last reply Reply Quote 0
      • S Away
        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 Away
            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