我想通过安装 audittrail 模块来管理 OpenERP 用户的活动。
创建一些规则后(定义将监视哪个用户、哪个对象和哪个活动(创建、更新..))。我更新产品以查看它是否有效。
当我尝试更新产品时,出现系统错误。看到日志,我得到
[2010-08-31 12:53:35,042] 游标未明确关闭
[2010-08-31 12:53:35,043] 游标是在 /home/pilgrim/working/sources/addons/audittrail 创建的/audittrail.py:204
这里导致错误的行
cr = pooler.get_db(db).cursor()
查看 sql_db.py,我得到了评论
def __del__(self):
if not self.__closed:
# Oops. 'self' has not been closed explicitly.
# The cursor will be deleted by the garbage collector,
# but the database connection is not put back into the connection
# pool, preventing some operation on the database like dropping it.
# This can also lead to a server overload.
msg = "Cursor not closed explicitly\n" \
"Cursor was created at %s:%s" % self.__caller
log(msg, netsvc.LOG_WARNING)
self.close()
由于我是 Python 新手,我不知道如何克服这个问题?
有什么提示可以克服这个吗?
感谢