Reproduzindo via Spotify Reproduzindo via YouTube
Saltar para vídeo do YouTube

Carregando o player...

Scrobble do Spotify?

Conecte a conta do Spotify à conta da Last.fm e faça o scrobble de tudo o que você ouve, seja em qualquer app para Spotify, dispositivo ou plataforma.

Conectar ao Spotify

Descartar

Não quer ver anúncios? Atualize agora

Python: dealing with ZipImportError in setuptools

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 :-)

Não quer ver anúncios? Atualize agora

API Calls