gpt4 book ai didi

python - 如何忽略 Python 中的弃用警告

转载 作者:行者123 更新时间:2023-12-01 05:53:17 27 4
gpt4 key购买 nike

我不断得到这个:

DeprecationWarning: integer argument expected, got float

如何让这条消息消失?有没有办法避免 Python 中的警告?

最佳答案

您应该修复您的代码,但以防万一,

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)

关于python - 如何忽略 Python 中的弃用警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52040960/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com