Python FileNotFoundError: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Python Language Exceptions =Overview= Thrown by file-related functions when the file is not found.")
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
=Overview=
=Overview=
Thrown by file-related functions when the file is not found.
Thrown by file-related functions when the file is not found.
To access the error message: <code>e.strerror</code>, which by default is "No such file or directory".
The full error message includes also the file in question, which can be accessed with <code>e.filename</code>.

Latest revision as of 04:19, 10 August 2022

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.