• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MagicMirror capture.py error

Scheduled Pinned Locked Moved Unsolved Troubleshooting
10 Posts 2 Posters 1.7k Views 2 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.
  • B Offline
    Buncie
    last edited by Nov 12, 2019, 6:34 PM

    I decided to restart the real time facial recong. I’m at the part when I’m testing the tools and I ran the capture.py and got this error.

    Traceback (most recent call last):
      File "capture.py", line 18, in <module>
        import lib.capture as capture
      File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/capture.py", line 21, in <module>
        from . import config
      File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/config.py", line 15, in <module>
        (CV_MAJOR_VER, CV_MINOR_VER, mv1, mv2) = cv2.__version__.split(".")
    ValueError: not enough values to unpack (expected 4, got 3)
    

    For the record, my python is 3.7 and my OpenCV is 4.0

    1 Reply Last reply Reply Quote 0
    • B Offline
      Buncie
      last edited by Nov 14, 2019, 6:26 PM

      Is there anyone who can see whats wrong with the code?

      S 1 Reply Last reply Nov 14, 2019, 6:49 PM Reply Quote 0
      • S Away
        sdetweil @Buncie
        last edited by Nov 14, 2019, 6:49 PM

        @Buncie see
        https://forum.magicmirror.builders/topic/10325/capture-py-in-mmm-facial-recognition-tools-error

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • B Offline
          Buncie
          last edited by Nov 14, 2019, 6:56 PM

          I did that and I got a new error.

          Traceback (most recent call last):
            File "capture.py", line 18, in <module>
              import lib.capture as capture
            File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/capture.py", line 12, in <module>
              from   builtins import input
          ImportError: No module named builtins
          
          S 1 Reply Last reply Nov 14, 2019, 6:58 PM Reply Quote 0
          • S Away
            sdetweil @Buncie
            last edited by Nov 14, 2019, 6:58 PM

            @Buncie

            looks like you need to run python3

            
            Traceback (most recent call last):
               File "capture.py", line 18, in 
                  import lib.capture as capture
               File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/capture.py", line 21, in 
                 from . import config
               File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/config.py", line 15, in 
                 (CV_MAJOR_VER, CV_MINOR_VER, mv1, mv2) = cv2.__version__.split(".")
            ValueError: not enough values to unpack (expected 4, got 3)
            
            Then im tring to sudo pip install future --upgrade,
            
            **I modified the code in config.py**
            
            from CV_MAJOR_VER, CV_MINOR_VER, mv1, mv2 = cv2.version.split(".")
            to CV_MAJOR_VER, CV_MINOR_VER, type = cv2.version.split(".")
            
            try: python3 capture.py // python capture.py
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • B Offline
              Buncie
              last edited by Nov 14, 2019, 7:00 PM

              Now it says this when I do have OpenCV.

              Traceback (most recent call last):
                File "capture.py", line 18, in <module>
                  import lib.capture as capture
                File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-Tools/lib/capture.py", line 19, in <module>
                  import cv2
              ModuleNotFoundError: No module named 'cv2'
              
              
              S 1 Reply Last reply Nov 14, 2019, 7:02 PM Reply Quote 0
              • S Away
                sdetweil @Buncie
                last edited by Nov 14, 2019, 7:02 PM

                @Buncie this module setup is a pain… i’m sorry, I don’t know any more on how to fix it.

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • B Offline
                  Buncie
                  last edited by Nov 18, 2019, 5:34 PM

                  Do you know anyone who can fix it?

                  S 1 Reply Last reply Nov 18, 2019, 5:36 PM Reply Quote 0
                  • S Away
                    sdetweil @Buncie
                    last edited by Nov 18, 2019, 5:36 PM

                    @Buncie no… i am sure I can. but don’t have time right now

                    also not sure what it is capturing from?

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      Buncie
                      last edited by Nov 22, 2019, 5:40 PM

                      What do you mean, “What is it capturing from?”
                      Where do you want me to look?

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      1 / 1
                      • First post
                        1/10
                        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