normyx / MMM-Facial-Recognition-OCV3

MIT License
51 stars 18 forks source link

Capture and Train the model problem #9

Open boomza19193 opened 6 years ago

boomza19193 commented 6 years ago

When i run python tools.capture.py. on python 3.4.2 it's show error

Traceback (most recent call last): File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/tools.capture.py", line 9, in from lib.tools.capture import ToolsCapture File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/capture.py", line 19, in from config import ToolsConfig ImportError: No module named 'config'

MuhammadJamee commented 6 years ago

You are missing files unfortunately, check lib/tools/ , if you see config.py file there

Jet-A commented 5 years ago

Having a similar issue. config.py exists.

Error Traceback (most recent call last): File "tools.capture.py", line 9, in from lib.tools.capture import ToolsCapture File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/capture.py", line 10, in from builtins import input ImportError: No module named builtins

ezar commented 5 years ago

same here!

mhauens commented 5 years ago

fixed it for me:

replace the line from builtins import input in /home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/capture.py and in file /home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/tools.capture.py with

import sys
if sys.version_info[0] < 3:
    import __builtin__ as builtins
else:
    import builtins
wadewhitten commented 5 years ago

I am still getting the error, even after editing the code @mhauens suggested. Any suggestions?

nischi commented 5 years ago

i have the same issue

nischi commented 5 years ago

okay for me it works if i use python3 instead of python

SdeGeata commented 5 years ago

Same error here:

pi@raspberrypi:~/MagicMirror/modules/MMM-Facial-Recognition-OCV3 $ python tools.capture.py Traceback (most recent call last): File "tools.capture.py", line 9, in <module> from lib.tools.capture import ToolsCapture File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/capture.py", line 23, in <module> from config import ToolsConfig ImportError: No module named 'config'

I have changed the "from builtins import input" lines as mhauens suggested, to no avail. Nothing works.

Nischi: How did you get it to work with Python3? Tried that too.

SdeGeata commented 5 years ago

I ended up fixing mine with this; in capture.py:

from config import ToolsConfig -> from .config import ToolsConfig