Python builtins.FileNotFoundError() Examples
The following are 2
code examples of builtins.FileNotFoundError().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
builtins
, or try the search function
.
Example #1
Source File: data.py From seismic-deeplearning with MIT License | 5 votes |
def _generate_images_and_masks(images_iter, mask_dir): for image_file in images_iter: file_part = _extract_filename(image_file) mask_file = os.path.join(mask_dir, file_part + "_mask.png") if os.path.exists(mask_file): yield image_file, mask_file else: raise FileNotFoundError(f"Could not find mask {mask_file} corresponding to {image_file}")
Example #2
Source File: test_utils.py From agents-aea with Apache License 2.0 | 5 votes |
def _raise_file_not_found_error(*args): raise FileNotFoundError()