thearn / webcam-pulse-detector

A python application that detects and highlights the heart-rate of an individual (using only their own webcam) in real-time.
Other
3.15k stars 594 forks source link

Error on get_pulse.py exec #2

Closed imanbee closed 11 years ago

imanbee commented 11 years ago

Ubuntu 12.10 x64. Whan does it mean?

Traceback (most recent call last):
  File "get_pulse.py", line 125, in <module>
    App = getPulseApp()
  File "get_pulse.py", line 17, in __init__
    self.camera = Camera(camera=0) #first camera by default
  File "~/Downloads/webcam-pulse-detector-master/lib/device.py", line 10, in __init__
    self.shape = self.get_frame().shape
AttributeError: 'NoneType' object has no attribute 'shape'
thearn commented 11 years ago

It looks like device.py tried to grab a frame from your webcam, but didn't receive anything from the device. Have you been able to use OpenCV before with this camera? Try running the test that I added (test_webcam.py) and see what happens.

imanbee commented 11 years ago

test_webcam.py works successful, but get_pulse.py fail. When i try to start program with root privileges (sudo) , i get:

Traceback (most recent call last):
  File "webcam-pulse-detector-master/get_pulse.py", line 2, in <module>
    from lib.processors import findFaceGetPulse
  File "/home/pchelkin/Downloads/webcam-pulse-detector-master/lib/processors.py", line 1, in <module>
    from openmdao.lib.datatypes.api import Float, Dict, Array, List, Int
ImportError: No module named openmdao.lib.datatypes.api

Maybe something wrong with OpenMDAO, don't know. I'm newbie in python

thearn commented 11 years ago

openmdao bootstraps itself into a virtualenv. Did you activate the virtualenv using . OpenMDAO/bin/activate, where OpenMDAO is the install directory?

imanbee commented 11 years ago

@universemaster No, i'm using standard python from ubuntu repos. @thearn yes, i did it, but no luck

mirosval commented 11 years ago

I'm getting the same on OSX Mountain Lion, OpenMDAO installed successfully, test_webcam.py works, but I get the following error:

Traceback (most recent call last):
  File "get_pulse.py", line 2, in <module>
    from lib.processors import findFaceGetPulse
  File "/path/webcam-pulse-detector/lib/processors.py", line 1, in <module>
    from openmdao.lib.datatypes.api import Float, Dict, Array, List, Int
ImportError: No module named lib.datatypes.api
maym86 commented 11 years ago

Did you get errors in the install? It can still complete with errors in some modules. You need to activate openmdao and when you run you need to type python first. Just typing the script name didn't work for me.

nTraum commented 11 years ago

Get the error as well, I'm on Ubuntu too.

It it normal that the activate script does not return any output when being executed?

thearn commented 11 years ago

Yes, it is normal for no output to be returned. The prompt in the terminal/command window should change to show that it has been activated (as normal for a python virtualenv)

arcanis commented 11 years ago

Same error on windows :

"No module named openmdao.lib.datatypes.api"

(Even after activate)

ChunixZ commented 8 years ago

I'm getting the same question on Windows 10. But as "maym86"'s say " Did you get errors in the install? It can still complete with errors in some modules. " I had double click to install "go-openmdao-0.13.0.py", so it's not okay. It should install go-openmdao-0.13.0.py in cmd as a command " python go-openmdao-0.13.0.py".