*you don't need to call a session.begin() method explicitly. *
*once you remove the begin() clause, this error will disappears.*
*
*

在 2013年1月17日星期四UTC+8下午11时51分56秒,jo写道:
>
> Hi all, 
>
> I'm running an web application in turbogears1 using sqlalchemy I'm using 
> mainly postgresql as database but in a few installations I'm using 
> oracle (same programs only db change). 
> Using PostgreSQL all is ok but when I use 
> oracle some times I get the following error: 
> ... 
>  File "/sf/prod/eggs/TurboGears-1.1.1-py2.6.egg/turbogears/database.py", 
> line 455, in sa_rwt 
>    request.sa_transaction = session.begin() 
>  File 
> "/sf/prod/eggs/SQLAlchemy-0.6.8-py2.6.egg/sqlalchemy/orm/scoping.py", 
> line 139, in do 
>    return getattr(self.registry(), name)(*args, **kwargs) 
>  File 
> "/sf/prod/eggs/SQLAlchemy-0.6.8-py2.6.egg/sqlalchemy/orm/session.py", 
> line 550, in begin 
>    "A transaction is already begun.  Use subtransactions=True " 
> InvalidRequestError: A transaction is already begun.  Use 
> subtransactions=True to allow subtransactions. 
>
> I'm not using explicity session.begin() because turbogears do that for me, 
> thus I don't know where to define subtransactions=True. 
> What can I do? 
>
> thanks for any help 
>
> j 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to