Python FileNotFoundError

From NovaOrdis Knowledge Base
Revision as of 04:19, 10 August 2022 by Ovidiu (talk | contribs) (→‎Overview)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

Thrown by file-related functions when the file is not found.

To access the error message: e.strerror, which by default is "No such file or directory".

The full error message includes also the file in question, which can be accessed with e.filename.