This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: SimpleCV error on Raspberry Pi
Type: behavior Stage: resolved
Components: IO Versions: Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: MJ, xiang.zhang
Priority: normal Keywords:

Created on 2017-01-19 14:39 by MJ, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg285791 - (view) Author: Michael J (MJ) Date: 2017-01-19 14:39
Hello,
I'm using a Microsoft LifeCam with SimpleCV on the ipython interpreter(or shell) on a Raspberry Pi 3 model B(with Raspbian, tell me if you need the exact OS version as it's quite complicated). 

I'm following the directions of a book: Raspberry Pi Cookbook by Simon Monk.
I get this error:
SimpleCV:1> c = Camera()

SimpleCV:2> i = c.getImage()

SimpleCV:3> i
SimpleCV:3: <SimpleCV.Image Object size:(640, 480), filename: (None), at memory location: (0x6efdfc88)>

SimpleCV:4> 

SimpleCV:4> i.show()
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
/usr/local/lib/python2.7/dist-packages/SimpleCV/Shell/Shell.pyc in <module>()
----> 1 i.show()

/usr/local/lib/python2.7/dist-packages/SimpleCV/ImageClass.pyc in show(self, type)
   5445               d = Display(displaytype='notebook')
   5446           else:
-> 5447               d = Display(self.size())
   5448           self.save(d)
   5449           return d

/usr/local/lib/python2.7/dist-packages/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/local/lib/python2.7/dist-packages/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 = pil.open(self.filename).convert("RGB")
    788                     self._bitmap = cv.CreateImageHeader(self._pil.size, cv.IPL_DEPTH_8U, 3)
    789                     cv.SetData(self._bitmap, self._pil.tostring())

/usr/local/lib/python2.7/dist-packages/PIL/Image.pyc in open(fp, mode)
   2280 
   2281     if filename:
-> 2282         fp = builtins.open(filename, "rb")
   2283 
   2284     try:

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

I(Michael J or "MJ" as I'm commonly called) have searched for the directory myself, and I can tell you, it's not there.

Tell me if you need more information, as I will be glad to assist.

I'm sorry for any inconvenience caused by me using ipython if it's unfamiliar.
msg285795 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2017-01-19 15:01
Hi Michael, this bug tracker is meant for developing CPython. Your problem exists in your own codes or third party applications. You'd better report to the related parties.
History
Date User Action Args
2022-04-11 14:58:42adminsetgithub: 73508
2017-01-19 15:01:08xiang.zhangsetstatus: open -> closed

nosy: + xiang.zhang
messages: + msg285795

resolution: third party
stage: resolved
2017-01-19 14:39:52MJcreate