错误代码门户
PythonPython错误代码

UnicodeError

UnicodeError

代码 UnicodeError · Python 报告的问题。

当发生 Unicode 相关的编码或解码错误时引发。它是 ValueError 的子类。 UnicodeError 具有描述编码或解码错误的属性。例如, err.object[err.start:err.end] 给出编解码器失败的特定无效输入。

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

Raised when a Unicode-related encoding or decoding error occurs. It is a subclass of ValueError. UnicodeError has attributes that describe the encoding or decoding error. For example, err.object[err.start:err.end] gives the particular invalid input that the codec failed on.

故障排除与诊断链接

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