From e86ea4cd259eab11c9757a579227a5c42562b54d Mon Sep 17 00:00:00 2001 From: Henry Addison Date: Tue, 26 Oct 2021 10:10:32 +0100 Subject: [PATCH] load requires a Loader arg in latest PyYAML PyYAML 6.0 was released recently and the load method now requires a Loader argument (see https://github.com/yaml/pyyaml/pull/561 and https://github.com/yaml/pyyaml/issues/576). Can either provide one like this (I think it's backwards compatible with version 5) or could pin the version of PyYAML in requirements.txt. --- start_zk_cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_zk_cluster.py b/start_zk_cluster.py index c2d562d..95b57b8 100644 --- a/start_zk_cluster.py +++ b/start_zk_cluster.py @@ -6,7 +6,7 @@ template = jinja_environment.get_template('zoo.cfg.template') with open('config.yaml') as f: - config = yaml.load(f) + config = yaml.load(f, Loader=yaml.SafeLoader) hosts = [(k, v) for k, v in config['hosts'].items()]