Oops, there are still some DBSession.commit() calls in the tutorial,
you can remove those from all of the controller code as TG2 does
automatic commits now.

And in the little database loading script you can just do import
transaction/transaction.commit()

--Mark Ramm

On Tue, Sep 30, 2008 at 10:49 AM, Mike Driscoll <[EMAIL PROTECTED]> wrote:
>
> Eric and Jorge,
>
> I'm getting an error farther along in the tutorial. When I run the
> initializeDB script, I get the following traceback:
>
> File "d:\tg2env\Wiki-20\initializeDB.py", line 19, in <module>
>  DBSession.commit()
> File "c:\Python25\Lib\site-packages\SQLAlchemy-0.5.0rc1-py2.5.egg
> \sqlalchemy\orm\scoping.py", line 106, in do
>  return getattr(self.registry(), name)(*args, **kwargs)
> File "c:\Python25\Lib\site-packages\SQLAlchemy-0.5.0rc1-py2.5.egg
> \sqlalchemy\orm\session.py", line 669, in commit
>  self.transaction.commit()
> File "c:\Python25\Lib\site-packages\SQLAlchemy-0.5.0rc1-py2.5.egg
> \sqlalchemy\orm\session.py", line 375, in commit
>  self._prepare_impl()
> File "c:\Python25\Lib\site-packages\SQLAlchemy-0.5.0rc1-py2.5.egg
> \sqlalchemy\orm\session.py", line 351, in _prepare_impl
>  ext.before_commit(self.session)
> File "c:\Python25\Lib\site-packages\zope.sqlalchemy-0.3-py2.5.egg\zope
> \sqlalchemy\datamanager.py", line 191, in before_commit
>  assert zope_transaction.get().status == 'Committing', "Transaction
> must be committed by zope"
>
>
> The database file does get created however, and the data seems to be
> there as well as I can query it with normal sqlalchemy. I'm not sure
> what's going on though.
>
> Also, the commands to create the virtualenv are either incomplete or
> I'm dumb. When I did what it said, it created the virtual environment
> and then downloaded TG and all its dependencies to my default Python
> installation.
>
> Mike
> >
>



-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to