Without seeing all of the files involved in the model, my first guess is that you have individual files for model objects, and in those files you import * from project.model, like so:
project/model/file1.py: from project.model import * project/model/file2.py: from project.model import * project/model/__init__.py: from project.model.file1 import * from project.model.file2 import * Which could cause an import loop. If Python manages to break out of it, SQLAlchemy would still have potential import loops in the graph, resulting in it thinking it needs to create the same tables twice (or more). On Wed, Jul 21, 2010 at 5:50 PM, Gisborne <[email protected]> wrote: > On Jul 21, 1:22 am, Guyren G Howe <[email protected]> wrote: > > I'm getting this error on the first table in a model file. > > > > The import is happening four times. The backtraces each time are: > > Pervasively adding > > __table_args__ = {'useexisting': True} > > to my orm class declarations fixed the error. But that's a peculiar > piece of tedious busy work to be required to do. Would love to know > what's causing this. > > -- > 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]<turbogears%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en. > > -- Michael J. Pedersen My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171 Yahoo/pedermj2002, MSN/[email protected] -- 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.

