Hello,
I'm trying to execute a dry run for delete snapshot when I got this error: TypeError: load() missing 1 required positional argument: 'Loader'
Note that it worked before (like 5 days ago). It started failing after we upgraded our production system PyYAML to 6. Is there a curator version that works with PyYAML 6 (AND it should also work with Elasticsearch 5.6.17)?
Will really appreciate your help!
Thank you!
Error:
[ec2-user@ip-00-00-00 elastic_backup]$ curator --config ./curator.yaml --dry-run delete_snapshots.yaml
Traceback (most recent call last):
File "/home/ec2-user/.local/bin/curator", line 11, in <module>
sys.exit(cli())
File "/home/ec2-user/.local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/ec2-user/.local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ec2-user/.local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.6/site-packages/curator/cli.py", line 243, in cli
run(config, action_file, dry_run)
File "/home/ec2-user/.local/lib/python3.6/site-packages/curator/cli.py", line 110, in run
client_args = process_config(config)
File "/home/ec2-user/.local/lib/python3.6/site-packages/curator/config_utils.py", line 43, in process_config
config = test_config(yaml_file)
File "/home/ec2-user/.local/lib/python3.6/site-packages/curator/config_utils.py", line 12, in test_config
yaml_config = get_yaml(config)
File "/home/ec2-user/.local/lib/python3.6/site-packages/curator/utils.py", line 59, in get_yaml
return yaml.load(read_file(path))
TypeError: load() missing 1 required positional argument: 'Loader'
Self diagnosis:
-
I came accross this issue: Delete_snapshot action fails, get() takes at least 2 arguments (2 given)
but I don't see any resolution? forgive me if I have missed it somewhere? -
some sites are suggesting that I should downgrade my pyyaml to 5.x.x BUT I cannot do that as that is going to break our production environment.
Software information:
{
"name" : "_BwkrrP",
"cluster_name" : "<OMITTED>:test-5",
"cluster_uuid" : "l0h6_<OMITTED>",
"version" : {
"number" : "5.6.17",
"build_hash" : "59bb0dc",
"build_date" : "2020-01-03T11:28:23.851Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}
pip3.6 list
elasticsearch-curator 5.8.2
PyYAML 6.0