错误代码门户
PythonPython错误代码

NameError

NameError

代码 NameError · Python 报告的问题。

当未找到本地或全局名称时引发。这仅适用于不合格的名称。关联值是一条错误消息,其中包含无法找到的名称。 可选的 name 仅关键字参数设置属性:

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

Raised when a local or global name is not found. This applies only to unqualified names. The associated value is an error message that includes the name that could not be found. The optional name keyword-only argument sets the attribute:

故障排除与诊断链接

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