Ask Your Question

Error in simple code

asked 2012-11-16 12:54:42 -0500

tooold gravatar image

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


VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
Traceback (most recent call last):
  File "Webcamblob/", line 6, in <module>
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/", line 5684, in show
    d = Display(self.size())
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/", 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/", line 551, in __bootstrap_inner
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/", 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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-17 20:17:30 -0500

marco619 gravatar image

I think the code bellow is wrong.

from SimpleCV import *
cam = Camera()

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

        ## You will use the function only for show a picture store in your local disk o a remote URL ##

        ##then, the following code will not run ##

To fix it, Do the following:

from SimpleCV import Camera, Display, Image

cam = Camera()
disp = Display()

while( disp.isNotDone() ):

 img = cam.getImage() display ) # This show the current frame in the Display.

I hope this useful.

edit flag offensive delete link more


Thanks for the snippet, but shouldn't the last line be: disp )

rpilkey gravatar imagerpilkey ( 2013-09-14 09:29:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-11-16 12:54:42 -0500

Seen: 1,181 times

Last updated: Nov 17 '12