GustaV schrieb: > Hi all! > > I have to do some strange things on the session (not scoped) instance > within my model package. > To do so "sess = DBSession()" works well apparently. But if > DBSession() is called somewhere in the model (either the __init__, > identity or anywhere else) it fails the "paster setup-app" command. > > sqlalchemy.exc.UnboundExecutionError: Could not locate a bind > configured on mapper Mapper|Permission|tg_permission or this Session > > It looks like a lake of coherence in the actual Session instance... > > The issue comes up for setup-app, but the other uses work fine. > > Does anyone can reproduce this?
This is due to the new SA-setup. The Session doesn't have a bind until init_model is called. And I don't consider that a bug - I wonder what your model needs to do in the DB while actually being defined? Diez --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

