错误代码门户
PythonPython错误代码

KeyError

KeyError

代码 KeyError · Python 报告的问题。

当在现有键集中找不到映射(字典)键时引发。

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

Raised when a mapping (dictionary) key is not found in the set of existing keys.

故障排除与诊断链接

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