Ask Your Question

SimpleCV - IO error when running IP camera

asked 2013-02-23 17:57:08 -0500

decrot gravatar image

updated 2013-02-23 17:57:53 -0500

So I tried this simplecv example using a ipcamera from my iphone and a app called ipcam

from SimpleCV import JpegStreamCamera, Display
import time

# initializes the IP Camera
cam = JpegStreamCamera('ipcamera address')

display = Display()
img = cam.getImage()
while not display.isDone():

    img = cam.getImage()

It works for the first minute, but leaving it on too long will error out

Traceback (most recent call last):
File "/home/user/", line 12, in <module>
  img = cam.getImage()
File "/usr/lib/pymodules/python2.7/SimpleCV/", line 904, in getImage
  return Image(, self)
File "/usr/local/lib/python2.7/dist-packages/PIL/", line 1980, in open
  raise IOError("cannot identify image file")
IOError: cannot identify image file

anyone know why I'm getting this error and more importantly, how to fix it? the video feed from a browser still works so it seems specific to simpleCV

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-02-25 09:15:16 -0500

kscottz gravatar image


Sorry you are having issues with SimpleCV. I was trying to use the JpegStreamCamera last night with my FIRST robotics team and ran into very similar issues. We are using an Axis M1011 camera for our robot. I am going to try to debug those issues tonight. I will probably have a blog post soon on we are working around them. If you check my personal twitter account and the dev github repo there should be a fix and a tutorial in the next few days. In the meantime this wiki lists the known IP camera configurations.

edit flag offensive delete link more

answered 2013-02-25 17:29:49 -0500

xamox gravatar image

You may also need to verify your camera feed IP address. Typically it needs to be in the form of:


The last part may not necessarily be /stream.cgi, you can test by loading in a browser such as firefox or chrome that support that form of JpegStream.

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-02-23 17:57:08 -0500

Seen: 4,056 times

Last updated: Feb 25 '13