Michael Bayer wrote: > the error message indicates that there is more than one Session in > play. a big reason for this is that people have "import > sqlalchemy.ext.threadlocal" lying around when they dont really want > that. > thanks for the hint,
I do not use threadlocal in any direct way but I am using sqlsoup. I tried to subclass sqlsoup and handle all the engine/metadata/session handling trough it but I still have the same error. What I am doing is creating the engine two times. The first time I create a database the second time I am using the database. could this be the problem? I am using the following method to do it: def _checkEngine(self): if self._connectioninfo.has_key('dbname'): connectionstr = '%(engine)s%(user)s:%(pw)s/%(dbname)s' % self._connectioninfo else: connectionstr = '%(engine)s%(user)s:%(pw)s' % self._connectioninfo if self._db is None: self._dbengine = create_engine(connectionstr) self._metadata = BoundMetaData(self._dbengine) self._db = RedSoup(self._metadata) self._db._metadata.engine.echo = True After creating the database I adapt self._connectioninfo, set self._db to None to force and call _checkEngine(). do I have to explicitly clean/close a session or BoundMetadata? thanks robert --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
begin:vcard fn:robert rottermann n:rottermann;robert email;internet:[EMAIL PROTECTED] tel;work:031 333 10 20 tel;fax:031 333 10 23 tel;home:031 333 36 03 x-mozilla-html:FALSE version:2.1 end:vcard