执行过程中PyCharm中的Yaml警告

2024-04-23 09:07:55 发布

您现在位置:Python中文网/ 问答频道 /正文

有人能解释为什么会发生这种情况吗

YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details

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

Tags: thedefaultyamlisloggingas情况load
2条回答

我正在使用yaml.load(),当我将其更改为yaml.safe_load()时,警告消失了。github上也有一个完整的讨论:github.com/bioconda/bioconda-utils/issues/462–

警告不是错误。它只是告诉您,您正在使用的YAML函数将在将来的更新中删除,如果您进行更新,该函数将不起作用,因此,如果有人使用较新的YAML版本,它将不起作用

这个link you referred to正好谈到了这一点,如何解决它,如何摆脱它

相关问题 更多 >