エラーコードポータル
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:

トラブルシューティング・診断リンク

まず、文書の製品・バージョン・発生環境が現在の状況と一致しているか確認してください。