[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] PIL Error



Is there a libpng/libjpg in your dist directory?  That might be it.

On 5/3/06, Kris Schnee <kschnee@xxxxxxxxxx> wrote:
I'm getting a weird error, which first appeared when I tried to build my
program into an EXE using py2exe. This version of the program uses PIL
rather than Pygame, but maybe someone here will know the answer.

My program loads image files. This works in IDLE or when double-clicking
on the source code. But when running it as an EXE, the image loading
explodes:

<code>
File "Image.pyc", line 1745, in open
IOError: cannot identify image file
</code>

I put the same image file into the dist directory as I was using in the
source code directory, and when I ran the EXE I did so from a DOS prompt
in the dist directory, so it should have no problem finding the file.
Any idea why compiling the EXE would cause this error?

Kris