I'm not on the PIL mailing list but I'll sign up and post there.
The one thing I was thinking scikit-learn could do is to give a better
message when
> imread(file_path)
in sklearn/datasets/lfw.py
returns a 0-dm array. Something to the effect of "the file wasn't
successfully read" instead of
IndexError. If PIL is returning an error, I don't believe it's being used.
On 3/20/2013 3:21 AM, Jaques Grobler wrote:
Thanks for reporting.. This is perhaps more a matter for the PIL
mailing list? http://www.pythonware.com/products/pil/ (See Free
Support section)
Unless, people know of any way we can help solve it on this side?
2013/3/19 Patrick Flaherty <[email protected] <mailto:[email protected]>>
I'm experimenting with the examples/tutorials to get a feel for
scikit-learn.
"Faces recognition example using eigenfaces and SVMs" example.
Windows 7, python 2.73., etc. Installed all the packages to the
latest
versions and the example was crashing here:
> face = np.asarray(imread(file_path)[slice_], dtype=np.float32)
in lfw.py
with an error to the effect of: can't slice a 0-dm array.
Eventually discovered that when you install PIL with pip, it does not
install the jpeg decoder. Only easy_install will install the
decoder as
well:
http://stackoverflow.com/questions/8891091/how-to-install-pil-package-with-jpeg-support-in-windows
I guess it makes sense that if you don't have the decoder, then the
array from imread(file_path) will be without dimensions - but it
took me
a while to get there.
I also found that the following is necessary on Windows 7 with PIL
code
as simple as this:
> import Image
> im=Image.open("file.jpg")
> im.show()
http://www.velocityreviews.com/forums/t707158-python-pil-and-vista-windows-7-show-not-working.html
That is, in ImageShow.py, for the Windows viewer, you need to
substitute:
> return "start /wait %s && PING 127.0.0.1 -n 5 > NUL && del /f %s" %
(file, file)
for the current line #99.
Pat
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Scikit-learn-general mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general