Python: dealing with ZipImportError in setuptools

RSS
Condividi

Mag 4 2011, 17:36

I spent most of today wrestling with a build problem in one of our internal Python modules. We use zc.buildout to automatically pull in the dependencies and build all the components for each module, but one of them started mysteriously failing with an error like this:

While:
Installing scripts.
Getting distribution for 'lfm.data'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
...
ZipImportError: bad local file header in /blah/blah/lfm.data-0.11.dev_r186049-py2.6.egg


This was particularly weird, as I could unzip that file fine with no problems.

Eventually I got some good advice from Alexis on the #distutils Freenode channel -- try using distribute, which is the successor to setuptools, as discussed here.

So I got a new version of bootstrap.py from here, ran it with the --distribute flag, then ran bin/buildout again -- and it all worked.

Why it failed in the first place is still a total mystery though :-)

Commenti

  • gskumar

    I am taking this opportunity to share some thoughts while I continue to be one of Last.Fm avid listener. Recently I bought a LED TV which has some interesting features like connecting to Wifi Routers which means the TV is internet Ready. I plugged the HDMI ports to my Amp and a perfect solution with minimal wires Music, Video or TV all in One with Single Remote control. Thats when I was wondering while reviewing some of the inbuilt Applications like YouTube, Flickr why not Last.fm which means I can power my TV to the best of Music. I thought for Last.fm this could mean additional Channel to distribute reaching out and delivering quality User Experience. Should you feel this is a good idea would be good to hear back on gskumar2001@gmail.com

    Mag 6 2011, 9:58
  • andrewclegg

    Hi gsukmar, thanks for the suggestion. We're continually on the lookout for new partnerships for music delivery, keep watching the site for news :-)

    Mag 6 2011, 10:44
Visualizza tutti (2 commenti)
Aggiungi un commento. Accedi a Last.fm o registrati (è gratuito).