Hi Chris,

On Sat, Feb 20, 2010 at 5:03 PM, Chris McDonough <chr...@plope.com> wrote:
> It looks like repoze.tm2 is committing the transaction before beaker has a
> chance to do a write.  Or something.  I'd move beaker below repoze.tm2 in
> paste.ini as a first shot at solving it.

Thanks for the reply. I gave that a go (I've previously tried swapping
the pipeline parts around to find a solution). Unfortunately to no
avail (and I'm using beaker in memory so it's no real surprise).

Wickert, Thanks for your reply. I had also wondered about that, but
usually an sqlalchemy error will come through in the traceback. Of
course it may be masked in some way (in a try/except statement). I'll
continue to investigate.

Thanks again for your replies.

Best,
Darryl

On Sat, Feb 20, 2010 at 5:03 PM, Chris McDonough <chr...@plope.com> wrote:
> It looks like repoze.tm2 is committing the transaction before beaker has a
> chance to do a write.  Or something.  I'd move beaker below repoze.tm2 in
> paste.ini as a first shot at solving it.
>
> On 2/19/10 8:39 PM, Darryl Cousins wrote:
>>
>> Hi,
>>
>> I'm frequently coming across a problem with the transaction. A typical
>> traceback is included below.
>>
>> Relevant section of paste.ini:
>>
>> [pipeline:main]
>> pipeline =
>>     responselogger
>>     browserid
>>     deliverance
>>     beaker
>>     egg:repoze.tm2#tm
>>     who
>>     myapp
>>
>> I don't call session.commit() anywhere in my code. And on refresh the
>> error disappears (usually the first refresh, sometimes on second or
>> third refresh).
>>
>> Has anyone else come across this problem and if so what was the
>> solution or source of the problem?
>>
>> Thanks in advance,
>> Darryl Cousins
>>
>> Traceback (most recent call last):
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Paste-1.7.2-py2.6.egg/paste/httpserver.py",
>> line 1062, in process_request_in_thread
>>     self.finish_request(request, client_address)
>>   File
>> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py",
>> line 320, in finish_request
>>     self.RequestHandlerClass(request, client_address, self)
>>   File
>> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py",
>> line 615, in __init__
>>     self.handle()
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Paste-1.7.2-py2.6.egg/paste/httpserver.py",
>> line 436, in handle
>>     BaseHTTPRequestHandler.handle(self)
>>   File
>> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py",
>> line 329, in handle
>>     self.handle_one_request()
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Paste-1.7.2-py2.6.egg/paste/httpserver.py",
>> line 431, in handle_one_request
>>     self.wsgi_execute()
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Paste-1.7.2-py2.6.egg/paste/httpserver.py",
>> line 287, in wsgi_execute
>>     self.wsgi_start_response)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/repoze.debug-0.7-py2.6.egg/repoze/debug/responselogger.py",
>> line 59, in __call__
>>     app_iter = self.application(environ, replace_start_response)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/repoze.browserid-0.2-py2.6.egg/repoze/browserid/middleware.py",
>> line 92, in __call__
>>     return self.app(environ, start_response)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/parts/svneggs/deliverance/deliverance/security.py",
>> line 89, in replacement_app
>>     return app(environ, start_response)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/parts/svneggs/deliverance/deliverance/middleware.py",
>> line 87, in __call__
>>     resp = req.get_response(self.app)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/WebOb-0.9.8-py2.6.egg/webob/request.py",
>> line 919, in get_response
>>     application, catch_exc_info=False)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/WebOb-0.9.8-py2.6.egg/webob/request.py",
>> line 887, in call_application
>>     app_iter = application(self.environ, start_response)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/Beaker-1.5.1-py2.6.egg/beaker/middleware.py",
>> line 152, in __call__
>>     return self.wrap_app(environ, session_start_response)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/repoze.tm2-1.0a5-py2.6.egg/repoze/tm/__init__.py",
>> line 47, in __call__
>>     self.commit()
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/repoze.tm2-1.0a5-py2.6.egg/repoze/tm/__init__.py",
>> line 52, in commit
>>     t.commit()
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/transaction-1.0.0-py2.6.egg/transaction/_transaction.py",
>> line 322, in commit
>>     self._commitResources()
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/transaction-1.0.0-py2.6.egg/transaction/_transaction.py",
>> line 419, in _commitResources
>>     rm.tpc_vote(self)
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/zope.sqlalchemy-0.4-py2.6.egg/zope/sqlalchemy/datamanager.py",
>> line 77, in tpc_vote
>>     self.tx.commit()
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/SQLAlchemy-0.6beta1-py2.6.egg/sqlalchemy/orm/session.py",
>> line 366, in commit
>>     self._assert_is_open()
>>   File
>> "/Users/darrylcousins/vortex/buildout/vortex/eggs/SQLAlchemy-0.6beta1-py2.6.egg/sqlalchemy/orm/session.py",
>> line 242, in _assert_is_open
>>     raise sa_exc.InvalidRequestError(error_msg)
>> InvalidRequestError: The transaction is closed
>> _______________________________________________
>> Repoze-dev mailing list
>> Repoze-dev@lists.repoze.org
>> http://lists.repoze.org/listinfo/repoze-dev
>>
>
>
> --
> Chris McDonough
> Agendaless Consulting, Fredericksburg VA
> The repoze.bfg Web Application Framework Book: http://bfg.repoze.org/book
>
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to