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 #1933 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Any tg-admin quickstart attempt fails (with patch)

Reported by: kvdb Owned by: kskuhlman
Priority: high Milestone: 1.5
Component: TurboGears Version: 1.5 HEAD
Severity: major Keywords:
Cc:

Description

Any quickstart attempt fails with TG 1.5 (r5113) from svn:

$ tg-admin quickstart Enter project name: test1234 Enter package name [test1234]: Do you need Identity (usernames/passwords) in this project? [no] Traceback (most recent call last):

File "/tmp/ivy/localroot/bin/tg-admin", line 8, in <module>

load_entry_point('TurboGears==1.5b1dev-r5111', 'console_scripts', 'tg-admin')()

File "/tmp/ivy/packages/turbogears/turbogears/command/base.py", line 378, in main

command.run()

File "/tmp/ivy/packages/turbogears/turbogears/command/quickstart.py", line 240, in run

sqlalchemyversion = str(get_requirement('sqlalchemy'))

File "/tmp/ivy/packages/turbogears/turbogears/command/quickstart.py", line 105, in get_requirement

" in the TurboGears setup.py:extras_require." % name)

ValueError?: Did not find matching sqlalchemy requirement in the TurboGears setup.py:extras_require.

Attachments

quickstart_fix.patch Download (511 bytes) - added by kvdb 10 years ago.

Change History

Changed 10 years ago by kvdb

comment:1 Changed 10 years ago by kvdb

  • Summary changed from Any tg-admin quickstart attempt fails to Any tg-admin quickstart attempt fails (with patch)

The attached patch fixes the problem.

comment:2 Changed 10 years ago by kskuhlman

  • Status changed from new to closed
  • Version set to 1.1 HEAD
  • Resolution set to fixed

Thanks for the bug report, and patch! The issue was actual a little bit more subtle, though. I had introduced a bug in setup.py when trying to add support for "setup.py develop" requirements (r5061). Fixed for 1.1 & 1.5 branches in r5138.

comment:3 Changed 10 years ago by kvdb

Great, thanks for the quick response! One local patch less...

comment:4 Changed 10 years ago by kvdb

  • Status changed from closed to reopened
  • Resolution fixed deleted

I cheered too soon. tg-admin is still not working.

tg-admin quickstart --elixir --identity

Traceback (most recent call last):

File "/tmp/ivy2/localroot/bin/tg-admin", line 8, in <module>

load_entry_point('TurboGears==1.5b1dev-r5139', 'console_scripts', 'tg-admin')()

File "/tmp/ivy2/packages/turbogears/turbogears/command/base.py", line 378, in main

command.run()

File "/tmp/ivy2/packages/turbogears/turbogears/command/quickstart.py", line 243, in run

elixirversion = str(get_requirement('future', 'elixir'))

File "/tmp/ivy2/packages/turbogears/turbogears/command/quickstart.py", line 105, in get_requirement

" in the TurboGears setup.py:extras_require." % name)

ValueError?: Did not find matching future requirement in the TurboGears setup.py:extras_require.

This time, it seems 'fixed' this way:

--- /tmp/ivy2/packages/turbogears/turbogears/command/quickstart.py.org 2008-08-11 23:34:25.000000000 +0200 +++ /tmp/ivy2/packages/turbogears/turbogears/command/quickstart.py 2008-08-11 23:34:45.000000000 +0200 @@ -240,7 +240,7 @@

sqlalchemyversion = str(get_requirement('sqlalchemy')) cmd_args.append("sqlalchemyversion=%s" % sqlalchemyversion)

if self.elixir:

  • elixirversion = str(get_requirement('future', 'elixir'))

+ elixirversion = str(get_requirement('sqlalchemy', 'elixir'))

cmd_args.append("elixirversion=%s" % elixirversion)

command.run(cmd_args)

That wasn't enough to get quickstart running:

Traceback (most recent call last):

File "./start-test4321.py", line 15, in <module>

start()

File "/tmp/ivy2/test4321/test4321/commands.py", line 54, in start

turbogears.start_server(Root())

File "/tmp/ivy2/packages/turbogears/turbogears/startup.py", line 221, in start_server

cherrypy.engine.start()

File "/tmp/ivy2/localroot/lib/python2.5/site-packages/CherryPy-3.1.0-py2.5.egg/cherrypy/process/wspbus.py", line 180, in start

self.publish('start')

File "/tmp/ivy2/localroot/lib/python2.5/site-packages/CherryPy-3.1.0-py2.5.egg/cherrypy/process/wspbus.py", line 147, in publish

output.append(listener(*args, kwargs))

File "/tmp/ivy2/packages/turbogears/turbogears/startup.py", line 151, in startTurboGears

ext.start_extension()

File "/tmp/ivy2/packages/turbogears/turbogears/visit/api.py", line 57, in start_extension

_manager = _create_visit_manager(timeout)

File "/tmp/ivy2/packages/turbogears/turbogears/visit/api.py", line 35, in _create_visit_manager

plugin = entrypoint.load()

File "/tmp/ivy2/localroot/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py", line 1912, in load File "/tmp/ivy2/packages/turbogears/turbogears/visit/sovisit.py", line 3, in <module>

from sqlobject import SQLObject, SQLObjectNotFound, StringCol?, DateTimeCol?

ImportError?: No module named sqlobject

Now, sqlobject needed to be installed (should have an SA project, right?!)

kvdb@dev:/tmp/ivy2/test4321$ easy_install sqlobject

Now I start the project and get another error, I've not seen before:

2008-08-11 23:50:05,889 cherrypy.error.145528652 DEBUG [11/Aug/2008:23:50:05] HTTP Traceback (most recent call last):

File "/tmp/ivy2/localroot/lib/python2.5/site-packages/CherryPy-3.1.0-py2.5.egg/cherrypy/_cprequest.py", line 603, in respond

self.hooks.run('before_handler')

File "/tmp/ivy2/localroot/lib/python2.5/site-packages/CherryPy-3.1.0-py2.5.egg/cherrypy/_cprequest.py", line 98, in run

hook()

File "/tmp/ivy2/localroot/lib/python2.5/site-packages/CherryPy-3.1.0-py2.5.egg/cherrypy/_cprequest.py", line 58, in call

return self.callback(self.kwargs)

TypeError?: track_visitors() got an unexpected keyword argument 'manager'

Looking at some details scrolling by after starting the project, this may reveal the cause:

2008-08-11 23:56:02,506 turbogears.visit.sovisit INFO No database is configured: Visit Tracking is disabled.

Strange, because while creating the project, it seemed the variables were alright: (And I haven't changed the dev.cfg afterwards).

tg-admin quickstart --elixir --identity Enter project name: qwerty Enter package name [qwerty]: Selected and implied templates:

TurboGears#tgbase tg base template TurboGears#turbogears web framework

Variables:

egg: qwerty elixir: True elixirversion: Elixir>=0.4.0 identity: sqlalchemy package: qwerty project: qwerty sqlalchemy: True sqlalchemyversion: SQLAlchemy>=0.3.10 sqlobject: False

If you need more info, I'll be happy to provide it.

comment:5 Changed 10 years ago by Chris Arndt

  • Priority changed from normal to high
  • Severity changed from normal to major

comment:6 Changed 10 years ago by faide

  • Milestone changed from 1.5 to 1.1

comment:7 Changed 10 years ago by kskuhlman

Applied the elixirversion change to quickstart.py in r5271 for 1.1 and 1.5.

I'm not getting the sqlobject or track_visitors errors. Can you see if you're still having the problem with a newly quickstarted app after doing a svn up and python setup.py develop? Also, if you're still having the problem with 1.5, can you check 1.1 for us, too? We're on a ticket-clearing binge right now, trying to get 1.1beta out the door, so it would be helpful to know that the milestone is set correctly.

Thanks for your help!

comment:8 Changed 10 years ago by Chris Arndt

  • Milestone changed from 1.1 to 1.1 beta 1

comment:9 Changed 10 years ago by Chris Arndt

  • Keywords needs re-test added

I can't reproduce any of the errors reported in comment no. 4 either with the current 1.1 branch HEAD (r5308). I made sure that I de-installed SQLObject before running quickstart.

I think the OP was referring to the 1.1 branch since at the revision 5113 he mentions, release.py from the 1.1 branch stil had teh "1.5b1" version number in it.

If we don't get feedback that the issue persists, I think we can close this ticket as fixed before the "1.1 beta 1" release.

comment:10 Changed 10 years ago by kvdb

  • Status changed from reopened to closed
  • Resolution set to fixed

yes, quickstart is working again for 1.1 and 1.5 branches (tested r5298).

comment:11 Changed 10 years ago by kskuhlman

  • Status changed from closed to reopened
  • Component changed from tg-admin (non-toolbox) to TurboGears
  • Version changed from 1.1 HEAD to 1.5 HEAD
  • Milestone changed from 1.1 beta 1 to 1.5
  • Keywords needs re-test removed
  • Resolution fixed deleted

The TypeError?: track_visitors() got an unexpected keyword argument 'manager' error is back. It's happening when a page is requested now, not during the quickstart itself.

comment:12 Changed 10 years ago by kskuhlman

  • Owner changed from anonymous to kskuhlman
  • Status changed from reopened to new

comment:13 Changed 10 years ago by kskuhlman

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

Fixed in r5440

Note: See TracTickets for help on using tickets.