On Jan 17, 2013, at 4:50 AM, jo wrote:

> 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 
> "/sferacarta/prod/eggs/TurboGears-1.1.1-py2.6.egg/turbogears/database.py", 
> line 455, in sa_rwt
>   request.sa_transaction = session.begin()
> File 
> "/sferacarta/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 
> "/sferacarta/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

you shouldn't have to deal with "subtransactions" in any case and this seems 
like a bug in turbogears.  Especially, there should be no difference at all in 
session handling between two different database backends - it suggests they 
might have "oracle" hardcoded somewhere though that would be very strange.   
you should ask on their list.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en.

Reply via email to