gpt4 book ai didi

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

转载 作者:IT老高 更新时间:2023-10-28 12:26:11 25 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/879173/

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