Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #343 (closed defect: worksforme)

Opened 14 years ago

Last modified 12 years ago

tg-admin broken with latest tg / setup_tools / paste and pastescript

Reported by: anonymous Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version:
Severity: major Keywords: tg-admin pastescript exception


i just updated turbogears to the latest version from svn (04-01-2006) and updated dependencies (setuptools, paste, etc) to match.

when i tried tg-admin is was broken with the error below:

/sites/turbogears# /usr/bin/tg-admin
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 7, in ?
  File "/srv/src/turbogears/turbogears/command/base.py", line 220, in main
    command = entrypoint.load()
  File "/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py", line 1625, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/srv/src/turbogears/turbogears/command/quickstart.py", line 13, in ?
    from paste.script import templates, create_distro
  File "/usr/lib/python2.4/site-packages/PasteScript-0.3.1-py2.4.egg/paste/script/templates.py", line 5, in ?
    import command
  File "/usr/lib/python2.4/site-packages/PasteScript-0.3.1-py2.4.egg/paste/script/command.py", line 21, in ?
    dist = pkg_resources.working_set.find(pkg_resources.Requirement('PasteScript'))
TypeError: __init__() takes exactly 4 arguments (2 given)

quick solution is to update /usr/lib/python2.4/site-packages/PasteScript-0.3.1-py2.4.egg/paste/script/command.py and fix the broken call to pkg_resources.

help(pkg_resources.Requirement) tells us to use pkg_resources.Requirement.parse instead of the init() method.

so correct code in PasteScript command.py should be:

dist = pkg_resources.working_set.find(pkg_resources.Requirement.parse('PasteScript'))

after this small fix, tg-admin works as expected with turbogears 0.9a0

Change History

comment:1 Changed 14 years ago by anonymous

  • Priority changed from high to normal

comment:2 Changed 14 years ago by anonymous

  • Status changed from new to closed
  • Resolution set to worksforme

works fine in r442

Note: See TracTickets for help on using tickets.