[ZODB-Dev] zeopack error

Martijn Pieters mj at zopatista.com
Tue Jan 31 11:35:27 UTC 2012


On Tue, Jan 31, 2012 at 12:23, Kaweh Kazemi <kaweh at me.com> wrote:
> [ERROR] 2012-01-31T09:20:25: (22455) Error raised in delayed method
> None

Ugh, a quick look at the code reveals that this must've been raised by
a SlowMethodThread handler, and it indeed doesn't provide the
exception info in the log because that's already been cleared.

However, the method that does the logging does get passed the
exception info (it is after all, partially passed back to the packing
script). Could you open ZEO/zrpc/connection.py and edit line 54, the
context looks like this:

    def error(self, exc_info):
        self.sent = 'error'
        log("Error raised in delayed method", logging.ERROR, exc_info=True)
        self.conn.return_error(self.msgid, *exc_info[:2])

If you do not know where that file is located, search for the ZODB3
egg path in your bin/zeo file, that's the directory where you'll find
the ZEO code. Change "exc_info=True" to "exc_info=exc_info", so the
error method looks like this:

    def error(self, exc_info):
        self.sent = 'error'
        log("Error raised in delayed method", logging.ERROR, exc_info=exc_info)
        self.conn.return_error(self.msgid, *exc_info[:2])

Restart your ZEO server and attempt to pack again. Now it should log
the exception instead of None.

-- 
Martijn Pieters


More information about the ZODB-Dev mailing list