[Distutils] occasional zipimport.ZipImportError: bad local file header

Fadhley Salim fadhley.salim at uk.calyon.com
Thu Feb 5 19:43:26 CET 2009

I'm working on an automatic testing framework which installs eggs
downloaded directly from the web-server. From time to time I get a very
long stacktrace leading to a ZipImportError (see the pastebin link).
Leading up to the error all I do is download the egg into the system's
%TEMP% folder. I'm installing the egg like this:

easy_install.main( ['-zma', '-f' , config.INSTALL_TOOLS_EGG_VALIDHOSTS,
filepath, ]

There is apparantly nothing wrong with the file - I can open it in
Winzip. If I re-run the process it seems to work fine. The file in
question appears to be identical. The error is rare, it seems to occur
in about 1 out of 100 easy_install operations. Any suggestions what
might be causing this? 

Very long stacktrace on pastebin:

I am using setuptools==0.6c9 on Python 2.4 running on Windows XP
-------------- next part --------------
This email does not create a legal relationship between any member of the 
Cr?dit Agricole group and the recipient or constitute investment advice. 
The content of this email should not be copied or disclosed (in whole or 
part) to any other person. It may contain information which is 
confidential, privileged or otherwise protected from disclosure. If you 
are not the intended recipient, you should notify us and delete it from 
your system. Emails may be monitored, are not secure and may be amended, 
destroyed or contain viruses and in communicating with us such conditions 
are accepted. Any content which does not relate to business matters is not 
endorsed by us.

Calyon is authorised by the Comit? des Etablissements de Cr?dit et des
Entreprises d'Investissement (CECEI) and supervised by the Commission Bancaire
in France and subject to limited regulation by the Financial Services Authority.
Details about the extent of our regulation by the Financial Services Authority
are available from us on request. Calyon is incorporated in France with limited
liability and registered in England & Wales. Registration number: FC008194.
Registered office: Broadwalk House, 5 Appold Street, London, EC2A 2DA.

More information about the Distutils-SIG mailing list