Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error in simple code

I just installed SimpleCV on my RaspberryPi (hopefully correct) but I just can't get this simple code (copied from the Example Codes) to run!

from SimpleCV import *
cam = Camera()

while (1):
        i = cam.getImage()
        i.show()

Error:

VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
ERROR: 
Traceback (most recent call last):
  File "Webcamblob/test.py", line 6, in <module>
    i.show()
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/ImageClass.py", line 5684, in show
    d = Display(self.size())
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/Display.py", line 157, in __init__
    self.screen = pg.display.set_mode(resolution, flags)
error: Unable to open a console terminal
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/Camera.py", line 26, in run
<type 'exceptions.TypeError'>: 'NoneType' object is not iterable

I hope anyone can help me, i do not know what to do anymore.