Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle yaml unsafe loader warning #418

Open
dyokelson opened this issue Oct 31, 2024 · 0 comments
Open

Handle yaml unsafe loader warning #418

dyokelson opened this issue Oct 31, 2024 · 0 comments

Comments

@dyokelson
Copy link
Collaborator

The yaml warning displays on every system init command (but not experiment init)

Example:

$ ./bin/benchpark system init --dest=ruby-system cts cluster=ruby
Hold tight, Benchpark is bootstrapping itself.
Hold tight, Benchpark is bootstrapping itself.
Hold tight, Benchpark is bootstrapping itself.
Hold tight, Benchpark is bootstrapping itself.
Hold tight, Benchpark is bootstrapping itself.
/g/g19/brink2/.benchpark/ramble/lib/ramble/ramble/repository.py:1006: UnsafeLoaderWarning:
The default 'Loader' for 'load(stream)' without further arguments can be unsafe.
Use 'load(stream, Loader=ruamel.yaml.Loader)' explicitly if that is OK.
Alternatively include the following in your code:

import warnings
warnings.simplefilter('ignore', ruamel.yaml.error.UnsafeLoaderWarning)

In most other cases you should consider using 'safe_load(stream)'
yaml_data = yaml.load(reponame_file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant