错误代码门户
PythonPython错误代码

ValueError

ValueError

代码 ValueError · Python 报告的问题。

当操作或函数接收到具有正确类型但值不合适的参数时引发,并且这种情况未通过更精确的异常(例如 IndexError)来描述。

Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。

Raised when an operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.

故障排除与诊断链接

请先确认文档中的产品、版本及发生环境与当前情况一致。