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

Opened 11 years ago

Last modified 11 years ago

tg-admin commands should exit with proper error message if SQLObject is required but not installed

Reported by: Chris Arndt Owned by: Chris Arndt
Priority: normal Milestone: 1.1b2
Component: tg-admin (non-toolbox) Version:
Severity: normal Keywords: import error


When one does a standard TG install, quickstarts a project with, changes into it and then runs tg-admin sql create, the following error is produced:

Traceback (most recent call last):
  File "/usr/local/bin/tg-admin", line 8, in <module>
    load_entry_point('TurboGears==', 'console_scripts', 'tg-admin')()
  File "/usr/lib/python2.5/site-packages/TurboGears-",
line 369, in main
  File "/usr/lib/python2.5/site-packages/TurboGears-",
line 125, in run
    from sqlobject.manager import command
ImportError: No module named sqlobject.manager

A similar errors produced when one tries to run the toolbox with tg-admin in a project with identity and SQLObject is not installed.

All tg-admin commands should check whether the need database support and detect whether SQLObject/SQLAlchemy is installed and die with a proper error message, if not:

This project requires the SQLObject package.
Before you run this project, you must install SQLObject by
running `python setup.py install` or `python setup.py develop`
in the project directory.

Also, the quickstart command, when creating a project with identity, should print a similar note at the end of the quickstart process, when SQLObject/SQLAlchemy is not installed.

Change History

comment:1 Changed 11 years ago by faide

  • Milestone changed from 1.1 to 1.1.1

comment:2 Changed 11 years ago by faide

  • Milestone changed from 1.6 to 1.5

comment:3 Changed 11 years ago by Chris Arndt

  • Milestone changed from 1.5 to 1.1

comment:4 Changed 11 years ago by Chris Arndt

  • Owner changed from anonymous to Chris Arndt
  • Status changed from new to assigned

comment:5 Changed 11 years ago by Chris Arndt

Fixed in r5490, 5491, r5493.

comment:6 Changed 11 years ago by Chris Arndt

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from 1.1 to 1.1 beta 2

That should be r5491, r5493 and r5494 (r5490, r5495 and r5496 are also related).

Since nobody had any suggestions or better ideas regarding the quality of r5496 when I  asked on the trunk mailing list, I'm closing this ticket as fixed now.

Note: See TracTickets for help on using tickets.