ReferenceException types
FileNotFoundError
The file or folder is not there.
Signature
FileNotFoundError(message)Returns
A subclass of OSError.
Example
Python
try:
open("not-there.txt")
except FileNotFoundError:
print("no such file")
print(issubclass(FileNotFoundError, OSError))Output
no such file True