[Image-SIG] broken data stream when reading image file

Simon Mosk-Aoyama simonsez at gmail.com
Sat May 29 04:03:16 CEST 2010


Hello,

I'm trying to get PIL to work on my OS X 10.6 box, and unfortunately
have ran into some trouble with the JPEG CODEC.

I installed the library from port, but when I try to run my
application and read a JPEG I get the following error:
broken data stream when reading image file

Tracing this back to PIL I went to install PIL manually, which seems to succeed:

--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version       1.1.7
platform      darwin 2.6.5 (r265:79063, Apr 17 2010, 18:49:39)
              [GCC 4.2.1 (Apple Inc. build 5659)]
--------------------------------------------------------------------
--- TKINTER support available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
--- LITTLECMS support available
--------------------------------------------------------------------

And yet when I run python selftest.py I get:
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL
--------------------------------------------------------------------
*** PIL CORE support not installed
*** TKINTER support not installed
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
*** FREETYPE2 support not installed
*** LITTLECMS support not installed
--------------------------------------------------------------------
Running selftest:
*****************************************************************
Failure in example:
try:
 _info(Image.open(os.path.join(ROOT, "Images/lena.jpg")))
except IOError, v:
 print v
from line #24 of selftest.testimage
Expected: ('JPEG', 'RGB', (128, 128))
Got: broken data stream when reading image file
1 items had failures:
   1 of  57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.

So far searches on the error message haven't turned up anything. I'm a
little concerned about the PIL_CORE not installed message, should I
be?

Any ideas?

Thanks

-Simon


More information about the Image-SIG mailing list