[Distutils] [issue116] typo in command.bdist_enc.make_zipfile

P.J. Eby pje at telecommunity.com
Tue Sep 21 17:12:04 CEST 2010

At 03:10 AM 9/21/2010 +0000, Ted Tibbetts wrote:
>Looks like there is a typo in the function `make_zipfile` in the 
>file `command/bdist_enc`: the last line of the else clause of the if 
>construct at the end of the function passes `file` as the third 
>parameter to `visit`; it should be passing `files`, I think.
>Symptoms include the exception `TypeError("'instancemethod' object 
>is not iterable")` when attempting to run `easy_install -n some_sdist.tar.gz`.
>Applying the attached patch seems to resolve the issue; I'm still 
>not entirely sure what it's telling me, but at least it's not 
>spitting out a stack trace.

Hi Ted.  It appears you are using distribute, not 
setuptools.  Unfortunately, some Linux distributions are shipping 
distribute (a fork of setuptools) under the name "setuptools", which 
creates user confusion.  If you are using your Linux distribution's 
installation of setuptools, please make sure to file this bug with 
your Linux distributor as well.

Distribute has many changes relative to setuptools, some of which 
have introduced new bugs.  It looks like this is the specific change 
that introduced the problem you're experiencing:


In this case the problem is fairly minor, since it only affects dry 
runs that would probably fail later in the process anyway.

Unless you are using Distribute by choice for its additional 
features, you may wish to uninstall it and replace it with a stable 
version of setuptools.  (Unfortunately, if you are using your Linux 
distributor's installation of it, this may not be possible.)

More information about the Distutils-SIG mailing list