执行期间 PyCharm 中的 Yaml 警告 [英] Yaml warning in PyCharm during execution

查看:78
本文介绍了执行期间 PyCharm 中的 Yaml 警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助解释发生这种情况的原因吗?

Can anyone help with the reason why this is happening?

YAMLLoadWarning:不推荐不使用 Loader=... 调用 yaml.load(),因为默认的 Loader 是不安全的.请阅读 https://msg.pyyaml.org/load 了解完整详情.

  logging.config.dictConfig(yaml.load(open('logging.yml', 'r')))

推荐答案

警告不是错误.它只是告诉您您正在使用 YAML 的一个功能,该功能将在未来的更新中删除,如果您更新该功能将无法使用,因此如果有人使用较新的 YAML 版本,它将无法使用.

Warnings are not Errors. It's just telling you that you're using a function of YAML that will be removed in a future update and that function will not work if you update, so if someone is using a newer YAML version it will not work.

链接你提到的具体谈到了这个问题,如何解决它以及如何摆脱它.

The link you referred to talks about that exactly, how to solve it and how to get rid of it.

这篇关于执行期间 PyCharm 中的 Yaml 警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆