Ask Your Question

Revision history [back]

Problem with img.show() in ipython notebook

I am getting this error while using img.show() on ipython notebook. It works perfectly in idle. I am using custom temp location on my windows 8.

---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-2-2556c4080454> in <module>()
----> 1 i.show()

C:\Python27\lib\site-packages\SimpleCV\ImageClass.pyc in show(self, type)
   5446           else:
   5447               d = Display(self.size())
-> 5448           self.save(d)
   5449           return d
   5450         else:

C:\Python27\lib\site-packages\SimpleCV\ImageClass.pyc in save(self, filehandle_or_filename, mode, verbose, temp, path, fname, **params)
   2020                   tf.close()
   2021                   self.save(loc)
-> 2022                   Idisplay.display(IPImage(filename=loc))
   2023                   return
   2024                 else:

C:\Python27\lib\site-packages\IPython\core\display.pyc in __init__(self, data, url, filename, format, embed)
    478         self.format = unicode(format).lower()
    479         self.embed = embed if embed is not None else (url is None)
--> 480         super(Image, self).__init__(data=data, url=url, filename=filename)
    481 
    482     def reload(self):

C:\Python27\lib\site-packages\IPython\core\display.pyc in __init__(self, data, url, filename)
    263             self.url = url
    264             self.filename = None if filename is None else unicode(filename)
--> 265         self.reload()
    266 
    267     def reload(self):

C:\Python27\lib\site-packages\IPython\core\display.pyc in reload(self)
    483         """Reload the raw data from file or URL."""
    484         if self.embed:
--> 485             super(Image,self).reload()
    486 
    487     def _repr_html_(self):

C:\Python27\lib\site-packages\IPython\core\display.pyc in reload(self)
    268         """Reload the raw data from file or URL."""
    269         if self.filename is not None:
--> 270             with open(self.filename, self._read_flags) as f:
    271                 self.data = f.read()
    272         elif self.url is not None:

IOError: [Errno 22] invalid mode ('rb') or filename: u'/tmp/e:\\temp\\tmprch1le.png'