Diez: I thought of the test you mentioned about two seconds before I read your post. I removed the find_links value in .pydistutils.cfg, and tgsetup.py worked fine.
I filed this as bug #2098, patch included. Andrew On Dec 20, 3:25 am, "Diez B. Roggisch" <[email protected]> wrote: > AJI schrieb: > > > > > > > I got this error when running tgsetup.py: > > > sudo python tgsetup.py > > TurboGears Installer > > Beginning setuptools/EasyInstall installation and TurboGears download > > > Traceback (most recent call last): > > File "tgsetup.py", line 458, in <module> > > tg_main() > > File "tgsetup.py", line 210, in tg_main > > main(args) > > File "tgsetup.py", line 422, in main > > main(argv) > > File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c9- > > py2.5.egg/setuptools/command/easy_install.py", line 1671, in main > > File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c9- > > py2.5.egg/setuptools/command/easy_install.py", line 1659, in > > with_ei_usage > > File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c9- > > py2.5.egg/setuptools/command/easy_install.py", line 1675, in <lambda> > > File "/usr/lib/python2.5/distutils/core.py", line 151, in setup > > dist.run_commands() > > File "/usr/lib/python2.5/distutils/dist.py", line 974, in > > run_commands > > self.run_command(cmd) > > File "/usr/lib/python2.5/distutils/dist.py", line 993, in > > run_command > > cmd_obj.ensure_finalized() > > File "/usr/lib/python2.5/distutils/cmd.py", line 117, in > > ensure_finalized > > self.finalize_options() > > File "tgsetup.py", line 269, in finalize_options > > self.find_links.append(TGDOWNLOAD) > >AttributeError: 'str' object has no attribute 'append' > > > I fixed it by changing tgsetup.py to check if self.find_links is a > > string, and if so, encase it in a list: > > > if self.find_links is None: > > self.find_links = [] > > # this elif fixes theAttributeError: 'str' object has no > > attribute 'append' error > > elif isinstance(self.find_links, (str, unicode)): > > # encase string in list > > self.find_links = [self.find_links] > > self.find_links.append(TGDOWNLOAD) > > > I wonder if I encountered this because I have a ~/.pydistutils.cfg > > file with a find_links value in the [easy_install] section, so > > find_links is initialized as a string instead of None (which is > > already handled). > > > Is this a satisfactory fix? If so, I will file a ticket on it. > > Well, you should be able to test this by temporarily removing that > config & trying again without your patch. > > However, that's just to make sure - you definitly had the bug, so I'd > say go forward & file a bug. > > Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

