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 #1413 (closed defect: invalid)

Opened 12 years ago

Last modified 12 years ago

tg-admin create fails with SQLAlchemy ('ForeignKey' object has no attribute 'dialect_impl')

Reported by: Outworlder Owned by: anonymous
Priority: normal Milestone: 1.0.3
Component: SQLAlchemy Version: 1.0.2
Severity: major Keywords:


When issuing the tg-admin create, I get the following traceback:

$ tg-admin sql create
Creating tables at sqlite:///devdata.sqlite
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 389, in main
  File "/usr/lib/python2.5/site-packages/TurboGears-", line 115, in run
    sacommand(command, sys.argv)
  File "<string>", line 5, in sacommand
  File "/usr/lib/python2.5/site-packages/TurboGears-", line 70, in sacreate
  File "build/bdist.linux-i686/egg/sqlalchemy/schema.py", line 1150, in create_all
  File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line 702, in create
  File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line 732, in _run_visitor
  File "build/bdist.linux-i686/egg/sqlalchemy/schema.py", line 1172, in accept_visitor
  File "build/bdist.linux-i686/egg/sqlalchemy/ansisql.py", line 798, in visit_metadata
  File "build/bdist.linux-i686/egg/sqlalchemy/sql.py", line 2602, in accept_visitor
  File "build/bdist.linux-i686/egg/sqlalchemy/ansisql.py", line 819, in visit_table
  File "build/bdist.linux-i686/egg/sqlalchemy/databases/sqlite.py", line 341, in get_column_specification
AttributeError: 'ForeignKey' object has no attribute 'dialect_impl'

Change History

comment:1 Changed 12 years ago by Outworlder

Found out what the problem was.

Instead of

Column('name', Integer, ForeignKey?('table.column'))

I wrote

Column('name', ForeignKey?('table.column'))

without the type.

comment:2 Changed 12 years ago by paj

  • Status changed from new to closed
  • Resolution set to invalid
Note: See TracTickets for help on using tickets.