[Image-SIG] PIL and py2app

Bob Ippolito bob at redivi.com
Thu Nov 17 06:16:01 CET 2005


py2app is smart enough to include all image plugins if it detects PIL  
is being used.  The problem was that the application needed a font,  
and the font wasn't listed as a data file so it didn't make it into  
the application bundle.

-bob

On Nov 16, 2005, at 5:48 PM, <kevin at cazabon.com> <kevin at cazabon.com>  
wrote:

> make sure to include the PNG image module maybe?  ImageFont font  
> files for
> PIL are PNG format.
>
> Kevin.
> ----- Original Message -----
> From: "Chris Jerdonek" <jerdonek at gmail.com>
> To: <image-sig at python.org>
> Sent: Wednesday, November 16, 2005 8:50 PM
> Subject: [Image-SIG] PIL and py2app
>
>
>> Does anyone know what might be causing this?
>>
>> I have a python program that uses some commands from the PIL module.
>>
>> PIL is installed on my Mac, and the program works fine when I run it
>> from the command line.  However, the PIL part of the program stops
>> working when I run it as an stand-alone app generated by py2app.  The
>> error message I'm getting is below.
>>
>> Also, I checked and I can see that the ImageFont.pyc file in a
>> subdirectory of the build directory that py2app created.
>>
>> Thanks for any help anybody can provide,
>> Chris
>>
>>
>> Traceback (most recent call last):
>>   File
>> "/Users/chris/Desktop/ER/StoveTop/Old/dist/stovetop.app/Contents/
>> Resources/Python/stovetop.py", line 205, in Click
>>     item.Activate(frame, event)
>>   File "reports.pyc", line 326, in GenerateReport
>>   File "reports.pyc", line 154, in makePie
>>   File "graph.pyc", line 202, in __init__
>>   File "PIL/ImageFont.pyc", line 202, in truetype
>>   File "PIL/ImageFont.pyc", line 121, in __init__
>> IOError: cannot open resource
>>
>> _______________________________________________
>> Image-SIG maillist  -  Image-SIG at python.org
>> http://mail.python.org/mailman/listinfo/image-sig
>>
>>
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig



More information about the Image-SIG mailing list