[Pythonmac-SIG] py2app warning: may need to include email.Util

Ronald Oussoren ronaldoussoren at mac.com
Tue Jan 16 22:35:08 CET 2007


On 16 Jan, 2007, at 22:20, Russell E Owen wrote:

> My py2app-bundled Mac application recently started failing with "no
> module named email.Util" when trying to display images. It turns out
> pyfits uses urllib which uses email.Util, which apparently has been
> renamed email.util with some kind of clever lazy import code so one  
> can
> still use email.Util. Apparently the cleverness is too much for  
> py2app's
> module finder.

The cleverness doesn't use the import statement, which is why py2app  
doesn't understand this. Py2exe will suffer from the same problem as  
it uses a simular algorithm.

>
> Anyway, the easy workaround is to specify email.Util as a necessary
> module to import. But I'll report a python bug or submit a urllib  
> patch.

It's unlikely that this will be fixed in Python itself, we'll have to  
add a recipe to py2app that works around this problem. I don't have  
time to look at this right now, patches are obviously welcome :-)

Ronald

P.S. This is an issue with Python >= 2.5 only.
>
> -- Russell
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3562 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070116/becbb5fd/attachment.bin 


More information about the Pythonmac-SIG mailing list