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.

    Can't get MMM-Facial-Recognition working

    Scheduled Pinned Locked Moved Solved Troubleshooting
    6 Posts 2 Posters 2.4k 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
      last edited by

      turn on the developers window with ctrl-shift-i
      then select the console tab, and look for messages as you move about

      also, how are you starting MM? with pm2? or your own command (npm start)

      the pm2.log file might show something

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • J Offline
        jorgh6
        last edited by

        Ok, thanks for the info. I’ve found that the magicmodule is supspended as a result of it crashing. Error in the log:
        0|MagicMir | TypeError: PythonShell is not a constructor
        0|MagicMir | at Class.python_start (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:11:21)
        0|MagicMir | at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-Facial-Recognition/node_helper.js:40:14)
        0|MagicMir | at Socket. (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11)
        0|MagicMir | at Socket.emit (events.js:182:13)
        0|MagicMir | at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
        0|MagicMir | at process._tickCallback (internal/process/next_tick.js:61:11)

        I’ve seen other reports of this issue, at least now I’ve got a lead where to look.

        Kind regards,

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil
          last edited by

          did you run npm install in the MMM-Facial-Recognition folder?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • J Offline
            jorgh6
            last edited by

            @jorgh6 said in Can't get MMM-Facial-Recognition working:

            TypeError: PythonShell is not a constructor

            This issue is discussed at https://github.com/paviro/MMM-Facial-Recognition/issues/58 . So I’ll pick it up from there. Apparently some api changes on recent PythonShell updates, there are more modules suffering from the same issue.

            1 Reply Last reply Reply Quote 0
            • J Offline
              jorgh6
              last edited by

              Got it working by changing two lines in node_helper.js (changes in bold).

              Line 4:
              const {PythonShell} = require(‘python-shell’);
              Line 11:
              const pyshell = new PythonShell(‘modules/’ + this.name + ‘/facerecognition/facerecognition.py’, { pythonPath: ‘python’, mode: ‘json’, args: [JSON.stringify(this.config)]});

              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