MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

MagicMirror capture.py error



  • 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 
        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)
    

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



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





  • I did that and I got a new error.

    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 12, in 
        from   builtins import input
    ImportError: No module named builtins
    


  • @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
    


  • Now it says this when I do have OpenCV.

    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 19, in 
        import cv2
    ModuleNotFoundError: No module named 'cv2'
    
    


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



  • Do you know anyone who can fix it?



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

    also not sure what it is capturing from?



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


Log in to reply