Ask Your Question

Getting traceback errors running 1st 'hello world' script

asked 2013-09-03 10:22:36 -0500

memilanuk gravatar image

So... fully up to date version of Ubuntu 13.04 on my laptop (Lenovo ThinkPad T530), downloaded the SimpleCV 1.3 superpack .deb file and installed it. When I open up an interactive interpreter, either regular python 2.7 or ipython, I get various errors as shown below:

In [1]: from SimpleCV import Camera, Display, Image
In [2]: cam = Camera()
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument

In [3]: display = Display()
IOError                                   Traceback (most recent call last)
<ipython-input-3-026b8c705ca8> in <module>()
----> 1 display = Display()

/usr/lib/pymodules/python2.7/SimpleCV/Display.pyc in __init__(self, resolution, flags, title, displaytype, headless)
    156         if not displaytype == 'notebook':
    157             self.screen = pg.display.set_mode(resolution, flags)
--> 158         scvLogo = SimpleCV.Image("simplecv").scale(32,32)
    159         pg.display.set_icon(scvLogo.getPGSurface())
    160         if flags != pg.FULLSCREEN and flags != pg.NOFRAME:

/usr/lib/pymodules/python2.7/SimpleCV/ImageClass.pyc in __init__(self, source, camera, colorSpace, verbose, sample, cv2image)
    785                     self._bitmap = cv.LoadImage(self.filename, iscolor=cv.CV_LOAD_IMAGE_COLOR)
    786                 except:
--> 787                     self._pil ="RGB")
    788                     self._bitmap = cv.CreateImageHeader(self._pil.size, cv.IPL_DEPTH_8U, 3)
    789                     cv.SetData(self._bitmap, self._pil.tostring())

/usr/lib/python2.7/dist-packages/PIL/Image.pyc in open(fp, mode)
   1986     if isStringType(fp):
   1987         filename = fp
-> 1988         fp =, "rb")
   1989     else:
   1990         filename = ""

IOError: [Errno 2] No such file or directory: '/usr/lib/pymodules/python2.7/SimpleCV/sampleimages/simplecv.png'

In [4]: well as a blank (black) pygame window. It looks like all of this goes back to one missing .png file?!?

Any ideas or suggestions welcome.



edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2013-09-04 11:01:55 -0500

Chitra gravatar image

updated 2013-09-08 05:04:59 -0500

Hi, I had similar problems a few days back and found manually copying the image at the path with sudo permissions the best solution. Here's the previous post.

edit flag offensive delete link more


Thanks! That seems to do the trick. Had to first create the 'sampleimages/' directory, then copy the image file over using sudo. It appears that the only way to close the display window created from the interactive interpreter is to exit the interpreter entirely? Is that normal?

memilanuk gravatar imagememilanuk ( 2013-09-04 13:03:17 -0500 )edit

Yes, that's normal. If you're using the show() function to display the image to the screen,it will keep the image on the screen until the program terminates,or until the shell closes. Clicking Close button on the window does not close the window. To get more control of the window, use Display object

Chitra gravatar imageChitra ( 2013-09-08 05:13:41 -0500 )edit

answered 2013-09-06 00:16:46 -0500

andycrofts gravatar image

updated 2013-09-06 00:22:31 -0500

Hi. Had exactly the same yesterday. Linux Mint 13, my total program was:

from SimpleCV import Camera, Display, Image

import time

cam = Camera() display = Display() img = Image("") img.drawText("FISH!!")"fish1.png") time.sleep(5)

Firstly, I reinstalled SimpleCV using the 'git' method on the "latest and greatest" section of the simplecv install page. Then, I had to sudo install python-pip, then sudo pip install svgwrite. There's no reason Display() should've called a sample file!

edit flag offensive delete link more

answered 2013-09-04 10:52:44 -0500

memilanuk gravatar image

BTT... can't seem to get an answer from anyone anywhere on this.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2013-09-03 10:22:36 -0500

Seen: 1,562 times

Last updated: Sep 08 '13