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

YAMLLoadWarning: calling yaml.load() without Loader= #179

Closed
dreiggy opened this issue Mar 9, 2020 · 7 comments
Closed

YAMLLoadWarning: calling yaml.load() without Loader= #179

dreiggy opened this issue Mar 9, 2020 · 7 comments

Comments

@dreiggy
Copy link

dreiggy commented Mar 9, 2020

Hi,
I got warning about deprecated and unsafe load:

/usr/local/lib/python3.6/site-packages/yamlconfig-0.3.1-py3.6.egg/yamlconfig.py:63: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.

https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

@pryorda
Copy link
Owner

pryorda commented Mar 11, 2020

What are the steps to reproduce this?

@mfominov
Copy link

this error appeared after container start.

I see this problem on pryorda/vmware_exporter:v0.11.1

@rmontenegroo
Copy link
Contributor

What are the steps to reproduce this?

Try to load a config.yaml:

sudo docker run -it --rm  -p 9272:9272 -e VSPHERE_USER=${VSPHERE_USERNAME} -e VSPHERE_PASSWORD=${VSPHERE_PASSWORD} -e VSPHERE_HOST=${VSPHERE_HOST} -e VSPHERE_IGNORE_SSL=True -e VSPHERE_SPECS_SIZE=2000 --name vmware_exporter -v $(pwd)/config.yaml:/config.yaml pryorda/vmware_exporter -c /config.yaml

@rmontenegroo
Copy link
Contributor

There is something (of course) to do with PyYAML version. Inside the container, PyYAML is 5.3, and here in my CentOS 8, it is 3.12 where the error does not happen.

@rmontenegroo
Copy link
Contributor

I made a PR replacing yamlconfig for PyYAML.

pryorda pushed a commit that referenced this issue Apr 20, 2020
* Fix to issue #179: removing yamlconfig, and using PyYAML itself instead
@rmontenegroo
Copy link
Contributor

Hi,
I got warning about deprecated and unsafe load:

/usr/local/lib/python3.6/site-packages/yamlconfig-0.3.1-py3.6.egg/yamlconfig.py:63: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.

https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

@dreiggy I believe it is solved. You may close this issue.

@dreiggy
Copy link
Author

dreiggy commented Apr 20, 2020

@rmontenegroo sure :)

@dreiggy dreiggy closed this as completed Apr 20, 2020
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

4 participants