nebula3-python 报错 Closing a connection that is in use

使用nebula3-python
报错 Closing a connection that is in use

class Nebula:
    def __init__(self, address='127.0.0.1', port=9669, username='root', psw='root'):
        # 定义配置
        self.config = Config()
        self.config.max_connection_pool_size = 10
        # 初始化连接池
        self.connection_pool = ConnectionPool()
        # 如果给定的服务器正常,则返回true,否则返回false。
        ok = self.connection_pool.init([(address, port)], self.config)
        # 从连接池中获取会话
        self.session = self.connection_pool.get_session(username, psw)
        # 选择空间
        self.session.execute('USE test')

    def test(self):
        result = self.session.execute("match (n) return n")
        print(result)

    def __exit__(self):
        # 释放会话
        self.session.release()
        # 关闭连接池
        self.connection_pool.close()

if __name__ == '__main__':
    n = Nebula(address='127.0.0.1', port=9669, username='root', psw='root')
    n.test()

报错 Closing a connection that is in use

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。