エラーコードポータル
PythonPythonエラーコード

NotADirectoryError

NotADirectoryError

コード NotADirectoryError · Pythonが報告した問題です。

ディレクトリではないものに対してディレクトリ操作 (os.listdir() など) が要求されたときに発生します。ほとんどの POSIX プラットフォームでは、操作がディレクトリ以外のファイルをディレクトリであるかのように開いたり走査しようとした場合にも、このエラーが発生する可能性があります。エラー番号 ENOTDIR に対応します。

Google Translate · 自動翻訳です。専門用語や適用条件は英語の原文で確認してください。

Raised when a directory operation (such as os.listdir()) is requested on something which is not a directory. On most POSIX platforms, it may also be raised if an operation attempts to open or traverse a non-directory file as if it were a directory. Corresponds to errno ENOTDIR.

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

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