On 05/04/11 00:30, Alex Marandon wrote:
I've setup Paste's ErrorMiddleware so that I could get exceptions emailed to me but it's breaking the bfgshell:

[...]
File "/home/al/myproject/eggs/repoze.bfg-1.2-py2.5.egg/repoze/bfg/scripting.py", line 12, in get_root
    registry = app.registry
AttributeError: 'ErrorMiddleware' object has no attribute 'registry'

The way I've enabled it is by using a filter-with directive in my main app section to reference a filter section which uses the egg:Paste#error_catcher entry point.

Is there a way to use Paste's ErrorMiddleware without breaking bfgshell?

Replying to myself. This problem was caused by calling an app which uses WSGI middleware. The shell should be used against a bare BFG app. I've written in more details about this problem and how to solve it in my notes at http://alexmarandon.com/articles/zodb_bfg_pyramid_notes/#beware-of-middleware


_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to